Fix egg tests (memory use: ~2.4G -> ~550M) (#3757)
This commit is contained in:
parent
2df5da2f61
commit
72702abb2f
|
@ -8,7 +8,6 @@ import { Species } from "#enums/species";
|
|||
import GameManager from "#test/utils/gameManager";
|
||||
import Phaser from "phaser";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import BattleScene from "../../battle-scene";
|
||||
|
||||
describe("Egg Generation Tests", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
|
@ -18,6 +17,7 @@ describe("Egg Generation Tests", () => {
|
|||
phaserGame = new Phaser.Game({
|
||||
type: Phaser.HEADLESS,
|
||||
});
|
||||
game = new GameManager(phaserGame);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
@ -26,12 +26,11 @@ describe("Egg Generation Tests", () => {
|
|||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
game = new GameManager(phaserGame);
|
||||
await game.importData("src/test/utils/saves/everything.prsv");
|
||||
});
|
||||
|
||||
it("should return Arceus for the 10th of June", () => {
|
||||
const scene = new BattleScene();
|
||||
const scene = game.scene;
|
||||
const timestamp = new Date(2024, 5, 10, 15, 0, 0, 0).getTime();
|
||||
const expectedSpecies = Species.ARCEUS;
|
||||
|
||||
|
@ -40,7 +39,7 @@ describe("Egg Generation Tests", () => {
|
|||
expect(result).toBe(expectedSpecies);
|
||||
});
|
||||
it("should return Arceus for the 10th of July", () => {
|
||||
const scene = new BattleScene();
|
||||
const scene = game.scene;
|
||||
const timestamp = new Date(2024, 6, 10, 15, 0, 0, 0).getTime();
|
||||
const expectedSpecies = Species.ARCEUS;
|
||||
|
||||
|
|
Loading…
Reference in New Issue