mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-02 12:51:57 +00:00
21 lines
656 B
TypeScript
21 lines
656 B
TypeScript
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
|
|
describe("reply session module imports", () => {
|
|
beforeEach(() => {
|
|
vi.resetModules();
|
|
});
|
|
|
|
it("does not load archive runtime on module import", async () => {
|
|
const archiveRuntimeLoads = vi.fn();
|
|
vi.doMock("../../gateway/session-archive.runtime.js", async (importOriginal) => {
|
|
archiveRuntimeLoads();
|
|
return await importOriginal<typeof import("../../gateway/session-archive.runtime.js")>();
|
|
});
|
|
|
|
await import("./session.js");
|
|
|
|
expect(archiveRuntimeLoads).not.toHaveBeenCalled();
|
|
vi.doUnmock("../../gateway/session-archive.runtime.js");
|
|
});
|
|
});
|