mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-10 03:48:27 +00:00
* Fix daily run generated movesets * add unit-tests for `fix-daily-run` (#3) * add `daily` and `classic` helper. split `runToSummon` there is now a `classicMode.runToSummon` which represents the old one used. There is now a `dailyMode.runToSummon` too * add daily_mode.test.ts covers the occured issue --------- Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
33 lines
748 B
TypeScript
33 lines
748 B
TypeScript
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|
import GameManager from "./utils/gameManager";
|
|
|
|
describe("Daily Mode", () => {
|
|
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 initialize properly", async () => {
|
|
await game.dailyMode.runToSummon();
|
|
|
|
const party = game.scene.getParty();
|
|
expect(party).toHaveLength(3);
|
|
party.forEach(pkm => {
|
|
expect(pkm.level).toBe(20);
|
|
expect(pkm.moveset.length).toBeGreaterThan(0);
|
|
});
|
|
});
|
|
});
|