The ward tests wave the rev-9 window through

The bite rides the stack now, so the three tests that expected an
instant sting drain the counteraction window before asserting the
wound. Green across the suite; the earlier commit shipped with these
red, which the pipeline should never have allowed — noted in the
operator's own scar tissue.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015RCWSTnb1KYTPyL4GmhGnF
This commit is contained in:
Eric Wagoner
2026-08-29 00:12:05 -04:00
co-authored by Claude Fable 5
parent 2a8539e59a
commit cadba96b43
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -398,6 +398,7 @@ describe("the ward window and chaos shields", () => {
expect(state.wardPending).toEqual({ ownerId: owner.id, takerId: thief.id });
// Spring it: the thief bleeds 3 and the ward is spent.
state = must(state, owner.id, { type: "wardChoice", play: true });
while (state.stack) state = must(state, state.stack.waitingOn, { type: "pass" });
expect(state.players.find((p) => p.id === thief.id)!.life).toBe(12);
expect(state.players.find((p) => p.id === owner.id)!.hand.some((c) => c.cardId === "ward")).toBe(false);
});
@@ -116,6 +116,7 @@ describe("expansion combat cards", () => {
state = must(state, me.id, { type: "pickUpTreasure" });
expect(state.wardPending).toEqual({ ownerId: enemy.id, takerId: me.id });
state = must(state, enemy.id, { type: "wardChoice", play: true });
while (state.stack) state = must(state, state.stack.waitingOn, { type: "pass" });
expect(state.players.find((p) => p.id === me.id)!.life).toBe(12);
expect(state.players.find((p) => p.id === enemy.id)!.hand.some((c) => c.cardId === "ward")).toBe(false);
});
+3 -1
View File
@@ -288,7 +288,9 @@ describe("the Ward is played in the moment", () => {
expect(state.wardPending).toEqual({ ownerId: "owner", takerId: "thief" });
// Nobody else may act while it hangs.
expect(applyCommand(state, "thief", { type: "endTurn", draw: 0 }).ok).toBe(false);
const r = applyCommand(state, "owner", { type: "wardChoice", play: true });
let r = applyCommand(state, "owner", { type: "wardChoice", play: true });
// Rev 9: the bite rides the stack — wave the counteraction window through.
if (r.ok && r.state.stack) r = applyCommand(r.state, r.state.stack.waitingOn, { type: "pass" });
if (!r.ok) throw new Error(r.error);
state = r.state;
expect(state.wardPending).toBeNull();