test(zalo): avoid loading monitor and probe modules in startup test

This commit is contained in:
Vincent Koc 2026-04-03 20:55:09 +09:00
parent fbc4fa6ac3
commit b925f6d46c
1 changed files with 2 additions and 6 deletions

View File

@ -16,18 +16,14 @@ const hoisted = vi.hoisted(() => ({
})),
}));
vi.mock("./monitor.js", async () => {
const actual = await vi.importActual<typeof import("./monitor.js")>("./monitor.js");
vi.mock("./monitor.js", () => {
return {
...actual,
monitorZaloProvider: hoisted.monitorZaloProvider,
};
});
vi.mock("./probe.js", async () => {
const actual = await vi.importActual<typeof import("./probe.js")>("./probe.js");
vi.mock("./probe.js", () => {
return {
...actual,
probeZalo: hoisted.probeZalo,
};
});