Update Healer Man server

This commit is contained in:
phenom committed 2026-09-26 17:51:56 -04:00
1 parent 9c5fb4c614
commit bd073fb00f
113 files changed
+4902 -273

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import assert from "node:assert/strict";
import test from "node:test";
import { normalizePartyBuffPolicy } from "./party-buff-policy.mjs";
test("accepts explicit party, tank, and healer selections", () => {
assert.deepEqual(normalizePartyBuffPolicy({ schemaVersion: 1, rules: [
{ abilityId: "priest-fortitude", scope: "party" },
{ abilityId: "paladin-blessing", scope: "tank" },
{ abilityId: "mage-intellect", scope: "healer" },
] }).rules.map((rule) => rule.scope), ["party", "tank", "healer"]);
});
test("rejects duplicate rules and invalid scopes", () => {
assert.throws(() => normalizePartyBuffPolicy({ schemaVersion: 1, rules: [
{ abilityId: "fortitude", scope: "party" }, { abilityId: "fortitude", scope: "tank" },
] }), /Duplicate/);
assert.throws(() => normalizePartyBuffPolicy({ schemaVersion: 1, rules: [
{ abilityId: "fortitude", scope: "everyone" },
] }), /valid abilityId and scope/);
});