diff --git a/tests/stages/page_chase.test.ts b/tests/stages/page_chase.test.ts index 7a32fad..cd4ba4b 100644 --- a/tests/stages/page_chase.test.ts +++ b/tests/stages/page_chase.test.ts @@ -131,4 +131,33 @@ describe("chase stage skeleton", () => { expect(newRound.mock.calls[0][1]).toBe("easy"); expect(newRound.mock.calls[1][1]).toBe("easy"); }); + + it("uses normal as default difficulty", () => { + const newRound = vi.fn(); + const getState = vi.fn().mockReturnValue({ + turn: 0, + snapshot: { + status: "playing", + thiefNodeId: "A", + guardNodeId: "B", + exitNodeId: "B", + graph: { + nodes: { + A: { id: "A", q: 0, r: 0, neighbors: ["B"] }, + B: { id: "B", q: 1, r: 0, neighbors: ["A"] }, + }, + edgeList: [["A", "B"]], + }, + }, + }); + const scene = new ChaseScene({ + model: { getState, moveThief: vi.fn(), newRound } as any, + }); + (scene as any).hudText = new Text({ text: "" }); + (scene as any).setupText = new Text({ text: "" }); + (scene as any).setSeedInput("1001"); + + (scene as any).startGame(); + expect(newRound).toHaveBeenCalledWith(1001, "normal"); + }); });