Fixed failing tests

This commit is contained in:
Bertie690 2025-09-21 20:40:53 -04:00
parent 74675471cc
commit 0a3ab00c56
2 changed files with 5 additions and 4 deletions

View File

@ -76,7 +76,8 @@ describe("Moves - Destiny Bond", () => {
// Turn 2: Player KO's the enemy before the enemy's turn
game.move.select(moveToUse);
await game.phaseInterceptor.to("BerryPhase");
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.toEndOfTurn();
expect(enemyPokemon.isFainted()).toBe(true);
expect(playerPokemon.isFainted()).toBe(true);

View File

@ -95,16 +95,16 @@ describe("Moves - Metronome", () => {
game.move.select(MoveId.METRONOME);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.phaseInterceptor.to("TurnEndPhase");
await game.toNextTurn();
expect(player.getTag(BattlerTagType.CHARGING)).toBeTruthy();
expect(player).toHaveBattlerTag(BattlerTagType.CHARGING);
const turn1PpUsed = metronomeMove.ppUsed;
expect.soft(turn1PpUsed).toBeGreaterThan(1);
expect(solarBeamMove.ppUsed).toBe(0);
await game.toNextTurn();
expect(player.getTag(BattlerTagType.CHARGING)).toBeFalsy();
expect(player).not.toHaveBattlerTag(BattlerTagType.CHARGING);
const turn2PpUsed = metronomeMove.ppUsed - turn1PpUsed;
expect(turn2PpUsed).toBeGreaterThan(1);
expect(solarBeamMove.ppUsed).toBe(0);