Add retain keyword to endTurn
This commit is contained in:
parent
8a6a2f7662
commit
62a1ef051c
1 changed files with 16 additions and 0 deletions
|
|
@ -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", () => {
|
describe("playCard - unplayable", () => {
|
||||||
test("unplayable card cannot be played", () => {
|
test("unplayable card cannot be played", () => {
|
||||||
let state = createCombatState("ironclad", "jaw_worm");
|
let state = createCombatState("ironclad", "jaw_worm");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue