[Test] Mock turn order in Miracle Eye test (#3437)

This commit is contained in:
NightKev 2024-08-08 11:02:02 -07:00 committed by GitHub
parent 49bb681554
commit f0d4dfa09e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,10 +2,11 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import Phaser from "phaser";
import GameManager from "#test/utils/gameManager";
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 { getMovePosition } from "../utils/gameManagerUtils";
import { MoveEffectPhase } from "#app/phases.js";
import { BattlerIndex } from "#app/battle.js";
describe("Internals", () => {
let phaserGame: Phaser.Game;
@ -38,6 +39,7 @@ describe("Internals", () => {
const enemy = game.scene.getEnemyPokemon()!;
game.doAttack(getMovePosition(game.scene, 0, Moves.CONFUSION));
await mockTurnOrder(game, [BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
await game.toNextTurn();
expect(enemy.hp).toBe(enemy.getMaxHp());