mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-23 07:49:36 +02:00
Polishing tests
This commit is contained in:
parent
4bd58f9756
commit
4182c1fb8a
@ -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());
|
||||
|
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user