mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-23 22:55:24 +00:00
test(ci): preserve runtime module shape in qr tests
This commit is contained in:
@@ -49,7 +49,13 @@ const mocks = vi.hoisted(() => ({
|
||||
}));
|
||||
const runtime = runtimeState.defaultRuntime;
|
||||
|
||||
vi.mock("../runtime.js", () => ({ defaultRuntime: runtimeState.defaultRuntime }));
|
||||
vi.mock("../runtime.js", async () => {
|
||||
const actual = await vi.importActual<typeof import("../runtime.js")>("../runtime.js");
|
||||
return {
|
||||
...actual,
|
||||
defaultRuntime: runtimeState.defaultRuntime,
|
||||
};
|
||||
});
|
||||
vi.mock("../config/config.js", () => ({ loadConfig: mocks.loadConfig }));
|
||||
vi.mock("../process/exec.js", () => ({ runCommandWithTimeout: mocks.runCommandWithTimeout }));
|
||||
vi.mock("./command-secret-gateway.js", () => ({
|
||||
|
||||
@@ -41,9 +41,13 @@ vi.mock("../infra/clipboard.js", () => ({
|
||||
copyToClipboard: copyToClipboardMock,
|
||||
}));
|
||||
|
||||
vi.mock("../runtime.js", () => ({
|
||||
defaultRuntime: runtime,
|
||||
}));
|
||||
vi.mock("../runtime.js", async () => {
|
||||
const actual = await vi.importActual<typeof import("../runtime.js")>("../runtime.js");
|
||||
return {
|
||||
...actual,
|
||||
defaultRuntime: runtime,
|
||||
};
|
||||
});
|
||||
|
||||
let dashboardCommand: typeof import("../commands/dashboard.js").dashboardCommand;
|
||||
let registerQrCli: typeof import("./qr-cli.js").registerQrCli;
|
||||
|
||||
Reference in New Issue
Block a user