mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-06 14:51:08 +00:00
test: expand builtin mock helper usage
This commit is contained in:
@@ -4,11 +4,10 @@ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
|
||||
import { prepareRestartScript, runRestartScript } from "./restart-helper.js";
|
||||
|
||||
vi.mock("node:child_process", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("node:child_process")>();
|
||||
return {
|
||||
...actual,
|
||||
const { mockNodeBuiltinModule } = await import("../../../test/helpers/node-builtin-mocks.js");
|
||||
return mockNodeBuiltinModule(importOriginal, {
|
||||
spawn: vi.fn(),
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
describe("restart-helper", () => {
|
||||
|
||||
Reference in New Issue
Block a user