mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-11 19:02:16 +02:00
Update import for bypassLogin in test
This commit is contained in:
parent
4988d6eb6d
commit
bd76a63964
@ -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 { pokerogueApi } from "#app/plugins/api/pokerogue-api";
|
||||||
import type { SessionSaveData } from "#app/system/game-data";
|
import type { SessionSaveData } from "#app/system/game-data";
|
||||||
import { Abilities } from "#enums/abilities";
|
import { Abilities } from "#enums/abilities";
|
||||||
@ -33,13 +33,13 @@ describe("System - Game Data", () => {
|
|||||||
|
|
||||||
describe("tryClearSession", () => {
|
describe("tryClearSession", () => {
|
||||||
beforeEach(() => {
|
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(game.scene.gameData, "getSessionSaveData").mockReturnValue({} as SessionSaveData);
|
||||||
vi.spyOn(account, "updateUserInfo").mockImplementation(async () => [true, 1]);
|
vi.spyOn(account, "updateUserInfo").mockImplementation(async () => [true, 1]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return [true, true] if bypassLogin is true", async () => {
|
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);
|
const result = await game.scene.gameData.tryClearSession(0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user