import { describe, expect, it } from "vitest"; import { resolveHealing } from "./combatHealing"; describe("combat healing resolution", () => { it("reports critical raw healing, effective healing, and overheal independently", () => { expect(resolveHealing(100, 950, 1_000, 0.25, 0.1)).toEqual({ rawAmount: 150, effectiveAmount: 50, overheal: 100, critical: true, }); }); it("does not resurrect a zero-health actor implicitly", () => { const result = resolveHealing(100, 0, 1_000, 0, 1); expect(result).toMatchObject({ rawAmount: 100, effectiveAmount: 100, overheal: 0, critical: false }); }); });