Release v0.1.6 2026-07-12
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { highestRoguelikeRoundAfterDefeat } from "./hunterStats";
|
||||
|
||||
describe("roguelike hunter records", () => {
|
||||
it("records the reached defeat round without lowering a previous best", () => {
|
||||
expect(highestRoguelikeRoundAfterDefeat(0, 1)).toBe(1);
|
||||
expect(highestRoguelikeRoundAfterDefeat(7, 12)).toBe(12);
|
||||
expect(highestRoguelikeRoundAfterDefeat(12, 7)).toBe(12);
|
||||
});
|
||||
|
||||
it("normalizes invalid and fractional round values", () => {
|
||||
expect(highestRoguelikeRoundAfterDefeat(Number.NaN, Number.NaN)).toBe(1);
|
||||
expect(highestRoguelikeRoundAfterDefeat(4.9, 8.9)).toBe(8);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user