Update import for bypassLogin in test

This commit is contained in:
Sirz Benjie 2025-04-14 16:50:47 -05:00
parent 801000b897
commit ae90e8c99a
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
import * as BattleScene from "#app/battle-scene";
import * as bypassLoginModule from "#app/global-vars/bypass-login";
import { pokerogueApi } from "#app/plugins/api/pokerogue-api";
import type { SessionSaveData } from "#app/system/game-data";
import { Abilities } from "#enums/abilities";
@ -33,13 +33,13 @@ describe("System - Game Data", () => {
describe("tryClearSession", () => {
beforeEach(() => {
vi.spyOn(BattleScene, "bypassLogin", "get").mockReturnValue(false);
vi.spyOn(bypassLoginModule, "bypassLogin", "get").mockReturnValue(false);
vi.spyOn(game.scene.gameData, "getSessionSaveData").mockReturnValue({} as SessionSaveData);
vi.spyOn(account, "updateUserInfo").mockImplementation(async () => [true, 1]);
});
it("should return [true, true] if bypassLogin is true", async () => {
vi.spyOn(BattleScene, "bypassLogin", "get").mockReturnValue(true);
vi.spyOn(bypassLoginModule, "bypassLogin", "get").mockReturnValue(true);
const result = await game.scene.gameData.tryClearSession(0);