diff --git a/src/config/sessions/store.pruning.integration.test.ts b/src/config/sessions/store.pruning.integration.test.ts index 3fde5236294..cba88dda8b9 100644 --- a/src/config/sessions/store.pruning.integration.test.ts +++ b/src/config/sessions/store.pruning.integration.test.ts @@ -10,11 +10,9 @@ vi.mock("../config.js", () => ({ loadConfig: vi.fn().mockReturnValue({}), })); -type StoreModule = typeof import("./store.js"); +import { loadConfig } from "../config.js"; +import { clearSessionStoreCacheForTest, loadSessionStore, saveSessionStore } from "./store.js"; -let clearSessionStoreCacheForTest: StoreModule["clearSessionStoreCacheForTest"]; -let loadSessionStore: StoreModule["loadSessionStore"]; -let saveSessionStore: StoreModule["saveSessionStore"]; let mockLoadConfig: ReturnType; const DAY_MS = 24 * 60 * 60 * 1000; @@ -81,10 +79,6 @@ describe("Integration: saveSessionStore with pruning", () => { }); beforeEach(async () => { - vi.resetModules(); - ({ clearSessionStoreCacheForTest, loadSessionStore, saveSessionStore } = - await import("./store.js")); - const { loadConfig } = await import("../config.js"); mockLoadConfig = vi.mocked(loadConfig) as ReturnType; testDir = await createCaseDir("pruning-integ"); storePath = path.join(testDir, "sessions.json");