mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-05-02 22:44:48 +01:00
[Test] Mock turn order in Miracle Eye test (#3437)
This commit is contained in:
parent
49bb681554
commit
f0d4dfa09e
@ -2,10 +2,11 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import GameManager from "#test/utils/gameManager";
|
import GameManager from "#test/utils/gameManager";
|
||||||
import { Species } from "#app/enums/species.js";
|
import { Species } from "#app/enums/species.js";
|
||||||
import { SPLASH_ONLY } from "../utils/testUtils";
|
import { mockTurnOrder, SPLASH_ONLY } from "../utils/testUtils";
|
||||||
import { Moves } from "#app/enums/moves.js";
|
import { Moves } from "#app/enums/moves.js";
|
||||||
import { getMovePosition } from "../utils/gameManagerUtils";
|
import { getMovePosition } from "../utils/gameManagerUtils";
|
||||||
import { MoveEffectPhase } from "#app/phases.js";
|
import { MoveEffectPhase } from "#app/phases.js";
|
||||||
|
import { BattlerIndex } from "#app/battle.js";
|
||||||
|
|
||||||
describe("Internals", () => {
|
describe("Internals", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
@ -38,6 +39,7 @@ describe("Internals", () => {
|
|||||||
const enemy = game.scene.getEnemyPokemon()!;
|
const enemy = game.scene.getEnemyPokemon()!;
|
||||||
|
|
||||||
game.doAttack(getMovePosition(game.scene, 0, Moves.CONFUSION));
|
game.doAttack(getMovePosition(game.scene, 0, Moves.CONFUSION));
|
||||||
|
await mockTurnOrder(game, [BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
expect(enemy.hp).toBe(enemy.getMaxHp());
|
expect(enemy.hp).toBe(enemy.getMaxHp());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user