From 4182c1fb8ae505cd0738a23d18f971a2a634644a Mon Sep 17 00:00:00 2001 From: Michael Li Date: Sat, 12 Oct 2024 23:20:02 -0400 Subject: [PATCH] Polishing tests --- src/test/moves/dragon_tail.test.ts | 2 +- src/test/moves/u_turn.test.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/moves/dragon_tail.test.ts b/src/test/moves/dragon_tail.test.ts index 007e53f163d..0c7d249db70 100644 --- a/src/test/moves/dragon_tail.test.ts +++ b/src/test/moves/dragon_tail.test.ts @@ -152,7 +152,7 @@ describe("Moves - Dragon Tail", () => { // Make sure the enemy switched to a healthy Pokemon const enemy = game.scene.getEnemyPokemon()!; expect(enemy).toBeDefined(); - expect(enemy.isFullHp).toBeTruthy(); + expect(enemy.isFullHp()).toBe(true); // Make sure the enemy has a fainted Pokemon in their party const faintedEnemy = game.scene.getEnemyParty().find(p => !p.isAllowedInBattle()); diff --git a/src/test/moves/u_turn.test.ts b/src/test/moves/u_turn.test.ts index f9f504e88be..b995c20f503 100644 --- a/src/test/moves/u_turn.test.ts +++ b/src/test/moves/u_turn.test.ts @@ -103,11 +103,15 @@ describe("Moves - U-turn", () => { Species.RAICHU, Species.SHUCKLE ]); + const enemy = game.scene.getEnemyPokemon()!; + // KO the opponent with U-Turn game.move.select(Moves.U_TURN); game.doSelectPartyPokemon(1); await game.phaseInterceptor.to(TurnEndPhase); + expect(enemy.isFainted()).toBe(true); + // Check that U-Turn forced a switch expect(game.phaseInterceptor.log).toContain("SwitchSummonPhase"); expect(game.scene.getPlayerPokemon()!.species.speciesId).toBe(Species.SHUCKLE); });