Update Healer Man server
This commit is contained in:
1 parent
9c5fb4c614
commit
bd073fb00f
113 files changed
+4902
-273
No files matched your search
@@ -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/);
|
||||
});
|
||||
Reference in new issue
Block a user