import { describe, expect, it } from "vitest"; import type { AbilityEffect } from "./abilityCatalog"; import { wow335DeathKnightEpidemicDotEffect, wow335DeathKnightEpidemicDurationMs, } from "./wow335DeathKnightEpidemicRuntime"; const frostFever: AbilityEffect = { kind: "dot", coefficient: 0.22, ticks: 5, intervalMs: 3_000, tag: "frost-fever", }; describe("WoW Death Knight Epidemic", () => { it("uses the generated 3- and 6-second disease duration ranks", () => { expect([0, 1, 2].map(wow335DeathKnightEpidemicDurationMs)).toEqual([0, 3_000, 6_000]); }); it("adds one periodic tick per three seconds to both Death Knight diseases", () => { expect(wow335DeathKnightEpidemicDotEffect(frostFever, 1)).toMatchObject({ ticks: 6 }); expect(wow335DeathKnightEpidemicDotEffect({ ...frostFever, tag: "blood-plague" }, 2)) .toMatchObject({ ticks: 7 }); }); it("leaves unrelated periodic effects and zero-rank diseases unchanged", () => { const unrelated = { ...frostFever, tag: "other-disease" } as AbilityEffect; expect(wow335DeathKnightEpidemicDotEffect(frostFever, 0)).toBe(frostFever); expect(wow335DeathKnightEpidemicDotEffect(unrelated, 2)).toBe(unrelated); }); });