fix(ci): restore cli runtime mocks and timeout exits

This commit is contained in:
Peter Steinberger
2026-03-22 23:43:16 +00:00
parent 85f8437399
commit 4e531d382b
11 changed files with 59 additions and 17 deletions

View File

@@ -25,6 +25,12 @@ const formatPortDiagnostics = vi.fn();
const pathExists = vi.fn();
const syncPluginsForUpdateChannel = vi.fn();
const updateNpmInstalledPlugins = vi.fn();
const runtimeLog = vi.fn();
const runtimeError = vi.fn();
const runtimeExit = vi.fn();
const runtimeWriteJson = vi.fn((value: unknown, space = 2) =>
runtimeLog(JSON.stringify(value, null, space > 0 ? space : undefined)),
);
vi.mock("@clack/prompts", () => ({
confirm,
@@ -131,9 +137,10 @@ vi.mock("./daemon-cli.js", () => ({
// Mock the runtime
vi.mock("../runtime.js", () => ({
defaultRuntime: {
log: vi.fn(),
error: vi.fn(),
exit: vi.fn(),
log: runtimeLog,
error: runtimeError,
writeJson: runtimeWriteJson,
exit: runtimeExit,
},
}));