mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-12-02 11:46:11 +00:00
28 lines
720 B
TypeScript
28 lines
720 B
TypeScript
|
import { LoadingScene } from "#app/loading-scene.js";
|
||
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||
|
import GameManager from "./utils/gameManager";
|
||
|
|
||
|
describe("BattleScene", () => {
|
||
|
let phaserGame: Phaser.Game;
|
||
|
let game: GameManager;
|
||
|
|
||
|
beforeAll(() => {
|
||
|
phaserGame = new Phaser.Game({
|
||
|
type: Phaser.HEADLESS,
|
||
|
});
|
||
|
});
|
||
|
|
||
|
beforeEach(() => {
|
||
|
game = new GameManager(phaserGame);
|
||
|
});
|
||
|
|
||
|
afterEach(() => {
|
||
|
game.phaseInterceptor.restoreOg();
|
||
|
});
|
||
|
|
||
|
it("should remove LoadingScene on create", () => {
|
||
|
// `BattleScene.create()` is called during the `new GameManager()` call
|
||
|
expect(game.scene.scene.remove).toHaveBeenCalledWith(LoadingScene.KEY);
|
||
|
});
|
||
|
});
|