diff --git a/src/state.test.js b/src/state.test.js index 9604f55..e8b20dc 100644 --- a/src/state.test.js +++ b/src/state.test.js @@ -353,6 +353,22 @@ describe("endTurn - ethereal", () => { }); }); +describe("endTurn - retain", () => { + test("retained cards stay in hand at end of turn", () => { + let state = createCombatState("ironclad", "jaw_worm"); + const player = { + ...state.player, + hand: ["strike_r", "equilibrium", "defend_r"], + }; + state = { ...state, player, players: [player] }; + const next = endTurn(state); + expect(next.player.hand).toContain("equilibrium"); + expect(next.player.discardPile).toContain("strike_r"); + expect(next.player.discardPile).toContain("defend_r"); + expect(next.player.hand).toHaveLength(1); + }); +}); + describe("playCard - unplayable", () => { test("unplayable card cannot be played", () => { let state = createCombatState("ironclad", "jaw_worm");