mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-10 16:51:13 +00:00
test: stabilize json runtime captures (#52428) (thanks @karanuppal)
This commit is contained in:
@@ -20,6 +20,12 @@ const mocks = vi.hoisted(() => {
|
||||
runtime: {
|
||||
log: runtimeLog,
|
||||
error: runtimeError,
|
||||
writeStdout: vi.fn((value: string) =>
|
||||
runtimeLog(value.endsWith("\n") ? value.slice(0, -1) : value),
|
||||
),
|
||||
writeJson: vi.fn((value: unknown, space = 2) =>
|
||||
runtimeLog(JSON.stringify(value, null, space)),
|
||||
),
|
||||
exit: runtimeExit,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user