Files
healer-man/src/game/wow335MageMoltenFuryRuntime.test.ts
T
2026-09-30 09:57:13 -04:00

31 lines
1.4 KiB
TypeScript

import { describe, expect, it } from "vitest";
import {
wow335MageMoltenFuryDamage,
wow335MageMoltenFuryMultiplier,
} from "./wow335MageMoltenFuryRuntime";
describe("WoW Mage Molten Fury", () => {
it("uses the generated 6% and 12% rank bonuses only below 35% target health", () => {
expect(wow335MageMoltenFuryMultiplier(1, "fire", 350, 1_000)).toBe(1);
expect(wow335MageMoltenFuryMultiplier(1, "fire", 349, 1_000)).toBe(1.06);
expect(wow335MageMoltenFuryMultiplier(2, "fire", 349, 1_000)).toBe(1.12);
expect(wow335MageMoltenFuryDamage(100, 1, "fire", 349, 1_000)).toBe(106);
expect(wow335MageMoltenFuryDamage(100, 2, "fire", 349, 1_000)).toBe(112);
});
it("applies to Fire, Frost, and Arcane damage, but not other schools", () => {
for (const school of ["fire", "frost", "arcane"] as const) {
expect(wow335MageMoltenFuryDamage(100, 1, school, 300, 1_000)).toBe(106);
}
for (const school of ["physical", "holy", "nature", "shadow"] as const) {
expect(wow335MageMoltenFuryDamage(100, 2, school, 300, 1_000)).toBe(100);
}
});
it("does nothing without an allocated rank or a valid target-health denominator", () => {
expect(wow335MageMoltenFuryDamage(100, 0, "fire", 300, 1_000)).toBe(100);
expect(wow335MageMoltenFuryDamage(100, 2, "fire", 1, 0)).toBe(100);
expect(wow335MageMoltenFuryDamage(100, 2, "fire", Number.NaN, 1_000)).toBe(100);
});
});