pokerogue/src/test/daily_mode.test.ts
NightKev 0d3fcd82bb
[Bug] Fix daily run generated movesets (#3519)
* 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>
2024-08-13 21:48:56 +01:00

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);
});
});
});