mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-07 07:59:26 +02:00
fixed stupid whirlwind tests
This commit is contained in:
parent
6a284b7ab3
commit
ca7947c770
@ -1,4 +1,3 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
|
||||||
import { Status } from "#data/status-effect";
|
import { Status } from "#data/status-effect";
|
||||||
import { AbilityId } from "#enums/ability-id";
|
import { AbilityId } from "#enums/ability-id";
|
||||||
import { BattleType } from "#enums/battle-type";
|
import { BattleType } from "#enums/battle-type";
|
||||||
@ -179,18 +178,13 @@ describe("Moves - Whirlwind", () => {
|
|||||||
const eligibleEnemy = enemyParty.filter(p => p.hp > 0 && p.isAllowedInBattle());
|
const eligibleEnemy = enemyParty.filter(p => p.hp > 0 && p.isAllowedInBattle());
|
||||||
expect(eligibleEnemy.length).toBe(1);
|
expect(eligibleEnemy.length).toBe(1);
|
||||||
|
|
||||||
// Spy on the queueMessage function
|
|
||||||
const queueSpy = vi.spyOn(globalScene.phaseManager, "queueMessage");
|
|
||||||
|
|
||||||
// Player uses Whirlwind; opponent uses Splash
|
// Player uses Whirlwind; opponent uses Splash
|
||||||
game.move.select(MoveId.WHIRLWIND);
|
game.move.select(MoveId.WHIRLWIND);
|
||||||
await game.move.selectEnemyMove(MoveId.SPLASH);
|
await game.move.selectEnemyMove(MoveId.SPLASH);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
// Verify that the failure message is displayed for Whirlwind
|
const player = game.field.getPlayerPokemon();
|
||||||
expect(queueSpy).toHaveBeenCalledWith(expect.stringContaining("But it failed"));
|
expect(player).toHaveUsedMove({ move: MoveId.WHIRLWIND, result: MoveResult.FAIL });
|
||||||
// Verify the opponent's Splash message
|
|
||||||
expect(queueSpy).toHaveBeenCalledWith(expect.stringContaining("But nothing happened!"));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should not pull in the other trainer's pokemon in a partner trainer battle", async () => {
|
it("should not pull in the other trainer's pokemon in a partner trainer battle", async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user