mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-25 16:12:13 +00:00
test: align cli runtime mocks with output runtime
This commit is contained in:
@@ -30,6 +30,12 @@ export function createCliRuntimeCapture(): CliRuntimeCapture {
|
||||
exit: (code: number) => {
|
||||
throw new Error(`__exit__:${code}`);
|
||||
},
|
||||
writeStdout: (value: string) => {
|
||||
runtimeLogs.push(value);
|
||||
},
|
||||
writeJson: (value: unknown, space = 2) => {
|
||||
runtimeLogs.push(JSON.stringify(value, null, space > 0 ? space : undefined));
|
||||
},
|
||||
},
|
||||
resetRuntimeCapture: () => {
|
||||
runtimeLogs.length = 0;
|
||||
|
||||
Reference in New Issue
Block a user