diff --git a/src/phases.ts b/src/phases.ts deleted file mode 100644 index 8b137891791..00000000000 --- a/src/phases.ts +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/test/abilities/mycelium_might.test.ts b/src/test/abilities/mycelium_might.test.ts index 2b8da27049d..061c43a1e9b 100644 --- a/src/test/abilities/mycelium_might.test.ts +++ b/src/test/abilities/mycelium_might.test.ts @@ -55,7 +55,7 @@ describe("Abilities - Mycelium Might", () => { // The opponent Pokemon (without Mycelium Might) goes first despite having lower speed than the player Pokemon. // The player Pokemon (with Mycelium Might) goes last despite having higher speed than the opponent. // This means that the commandOrder is equivalent to the speed Order reversed - expect(speedOrder.reverse().every((val, index) => val === commandOrder[index])).toBe(true); + expect(speedOrder.reverse()).toEqual(commandOrder); await game.phaseInterceptor.to(TurnEndPhase); // Despite the opponent's ability (Clear Body), its attack stat is still reduced. expect(enemyPokemon?.summonData.battleStats[BattleStat.ATK]).toBe(-1); @@ -75,7 +75,7 @@ describe("Abilities - Mycelium Might", () => { // The player Pokemon (with M.M.) goes first because its move is still within a higher priority bracket than its opponent. // The enemy Pokemon goes second because its move is in a lower priority bracket. // This means that the commandOrder should be identical to the speedOrder - expect(speedOrder.every((val, index) => val === commandOrder[index])).toBe(true); + expect(speedOrder).toEqual(commandOrder); await game.phaseInterceptor.to(TurnEndPhase); // Despite the opponent's ability (Clear Body), its attack stat is still reduced. expect(enemyPokemon?.summonData.battleStats[BattleStat.ATK]).toBe(-1); @@ -93,6 +93,6 @@ describe("Abilities - Mycelium Might", () => { // The player Pokemon (with M.M.) goes first because it has a higher speed and did not use a status move. // The enemy Pokemon (without M.M.) goes second because its speed is lower. // This means that the commandOrder should be identical to the speedOrder - expect(speedOrder.every((val, index) => val === commandOrder[index])).toBe(true); + expect(speedOrder).toEqual(commandOrder); }, 20000); }); diff --git a/src/test/abilities/stall.test.ts b/src/test/abilities/stall.test.ts index f08a8f5fb8f..b4374e31e20 100644 --- a/src/test/abilities/stall.test.ts +++ b/src/test/abilities/stall.test.ts @@ -50,7 +50,7 @@ describe("Abilities - Stall", () => { // The player Pokemon (without Stall) goes first despite having lower speed than the opponent. // The opponent Pokemon (with Stall) goes last despite having higher speed than the player Pokemon. // This means that the commandOrder is equivalent to the speed Order reversed - expect(speedOrder.reverse().every((val, index) => val === commandOrder[index])).toBe(true); + expect(speedOrder.reverse()).toEqual(commandOrder); }, 20000); it("Pokemon with Stall will go first if a move that is in a higher priority bracket than the opponent's move is used", async() => { @@ -65,7 +65,7 @@ describe("Abilities - Stall", () => { // The opponent Pokemon (with Stall) goes first because its move is still within a higher priority bracket than its opponent. // The player Pokemon goes second because its move is in a lower priority bracket. // This means that the commandOrder should be identical to the speedOrder - expect(speedOrder.every((val, index) => val === commandOrder[index])).toBe(true); + expect(speedOrder).toEqual(commandOrder); }, 20000); it("If both Pokemon have stall and use the same move, speed is used to determine who goes first.", async() => { @@ -82,6 +82,6 @@ describe("Abilities - Stall", () => { // The opponent Pokemon (with Stall) goes first because it has a higher speed. // The player Pokemon (with Stall) goes second because its speed is lower. // This means that the commandOrder should be identical to the speedOrder - expect(speedOrder.every((val, index) => val === commandOrder[index])).toBe(true); + expect(speedOrder).toEqual(commandOrder); }, 20000); });