From daeaf9d3fdddedda57ccb837e02dccfcaf1abd18 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Fri, 15 Nov 2024 18:40:02 -0800 Subject: [PATCH] Fix unreliable Speed Boost test --- src/test/abilities/speed_boost.test.ts | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/test/abilities/speed_boost.test.ts b/src/test/abilities/speed_boost.test.ts index dd2e83aaa88..ff5184eedae 100644 --- a/src/test/abilities/speed_boost.test.ts +++ b/src/test/abilities/speed_boost.test.ts @@ -28,7 +28,9 @@ describe("Abilities - Speed Boost", () => { game.override .battleType("single") - .enemySpecies(Species.DRAGAPULT) + .enemySpecies(Species.SHUCKLE) + .enemyAbility(Abilities.BALL_FETCH) + .enemyLevel(100) .ability(Abilities.SPEED_BOOST) .enemyMoveset(Moves.SPLASH) .moveset([ Moves.SPLASH, Moves.U_TURN ]); @@ -70,21 +72,23 @@ describe("Abilities - Speed Boost", () => { Species.NINJASK ]); - game.move.select(Moves.U_TURN); - game.doSelectPartyPokemon(1); - await game.toNextTurn(); - let playerPokemon = game.scene.getPlayerPokemon()!; - expect(playerPokemon.getStatStage(Stat.SPD)).toBe(0); + const [ shuckle, ninjask ] = game.scene.getPlayerParty(); game.move.select(Moves.U_TURN); game.doSelectPartyPokemon(1); await game.toNextTurn(); - playerPokemon = game.scene.getPlayerPokemon()!; - expect(playerPokemon.getStatStage(Stat.SPD)).toBe(0); + expect(game.scene.getPlayerPokemon()!).toBe(ninjask); + expect(ninjask.getStatStage(Stat.SPD)).toBe(0); + + game.move.select(Moves.U_TURN); + game.doSelectPartyPokemon(1); + await game.toNextTurn(); + expect(game.scene.getPlayerPokemon()!).toBe(shuckle); + expect(shuckle.getStatStage(Stat.SPD)).toBe(0); game.move.select(Moves.SPLASH); await game.toNextTurn(); - expect(playerPokemon.getStatStage(Stat.SPD)).toBe(1); + expect(shuckle.getStatStage(Stat.SPD)).toBe(1); }); it("should not trigger this turn if pokemon was switched into combat via normal switch, but the turn after",