From 5504af588661236231f39acb2089b97595f79c42 Mon Sep 17 00:00:00 2001 From: innerthunder Date: Fri, 29 Nov 2024 17:59:46 -0800 Subject: [PATCH] Remove lingering TIMEOUTs --- src/test/moves/powder.test.ts | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/src/test/moves/powder.test.ts b/src/test/moves/powder.test.ts index 89518640d9c..3e95f064c19 100644 --- a/src/test/moves/powder.test.ts +++ b/src/test/moves/powder.test.ts @@ -10,7 +10,6 @@ import { Type } from "#enums/type"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { StatusEffect } from "#enums/status-effect"; - describe("Moves - Powder", () => { let phaserGame: Phaser.Game; let game: GameManager; @@ -58,8 +57,7 @@ describe("Moves - Powder", () => { await game.phaseInterceptor.to(BerryPhase, false); expect(enemyPokemon.getLastXMoves()[0].result).toBe(MoveResult.SUCCESS); expect(enemyPokemon.hp).toBe(Math.ceil(3 * enemyPokemon.getMaxHp() / 4)); - }, TIMEOUT - ); + }); it( "should have no effect against Grass-type Pokemon", @@ -75,8 +73,7 @@ describe("Moves - Powder", () => { await game.phaseInterceptor.to(BerryPhase, false); expect(enemyPokemon.getLastXMoves()[0].result).toBe(MoveResult.SUCCESS); expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp()); - }, TIMEOUT - ); + }); it( "should have no effect against Pokemon with Overcoat", @@ -92,8 +89,7 @@ describe("Moves - Powder", () => { await game.phaseInterceptor.to(BerryPhase, false); expect(enemyPokemon.getLastXMoves()[0].result).toBe(MoveResult.SUCCESS); expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp()); - }, TIMEOUT - ); + }); it( "should not damage the target if the target has Magic Guard", @@ -109,8 +105,7 @@ describe("Moves - Powder", () => { await game.phaseInterceptor.to(BerryPhase, false); expect(enemyPokemon.getLastXMoves()[0].result).toBe(MoveResult.FAIL); expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp()); - }, TIMEOUT - ); + }); it( "should not prevent the target from thawing out with Flame Wheel", @@ -147,10 +142,9 @@ describe("Moves - Powder", () => { expect(enemyPokemon.getLastXMoves()[0].result).toBe(MoveResult.FAIL); expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp()); expect(enemyPokemon.summonData?.types).not.toBe(Type.FIRE); - }, TIMEOUT - ); + }); - // TODO: Implement this interaction and enable this test + // TODO: Implement this interaction to pass this test it.skip( "should cancel Fire-type moves generated by the target's Dancer ability", async () => { @@ -173,8 +167,7 @@ describe("Moves - Powder", () => { expect(playerPokemon.hp).toBe(playerPokemon.getMaxHp()); // enemy should have taken damage from player's Fiery Dance + 2 Powder procs expect(enemyPokemon.hp).toBe(enemyStartingHp - 2 * Math.floor(enemyPokemon.getMaxHp() / 4)); - }, TIMEOUT - ); + }); it( "should cancel Revelation Dance if it becomes a Fire-type move", @@ -192,8 +185,7 @@ describe("Moves - Powder", () => { await game.phaseInterceptor.to(BerryPhase, false); expect(enemyPokemon.getLastXMoves()[0].result).toBe(MoveResult.FAIL); expect(enemyPokemon.hp).toBe(Math.ceil(3 * enemyPokemon.getMaxHp() / 4)); - }, TIMEOUT - ); + }); it( "should cancel Shell Trap and damage the target, even if the move would fail", @@ -209,6 +201,5 @@ describe("Moves - Powder", () => { await game.phaseInterceptor.to(BerryPhase, false); expect(enemyPokemon.getLastXMoves()[0].result).toBe(MoveResult.FAIL); expect(enemyPokemon.hp).toBe(Math.ceil(3 * enemyPokemon.getMaxHp() / 4)); - }, TIMEOUT - ); + }); });