mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 03:11:10 +00:00
test: restore runtime-aware cli mocks
This commit is contained in:
@@ -61,7 +61,7 @@ describe("memory cli", () => {
|
||||
function spyRuntimeLogs() {
|
||||
const logSpy = vi.spyOn(defaultRuntime, "log").mockImplementation(() => {});
|
||||
vi.spyOn(defaultRuntime, "writeJson").mockImplementation((value: unknown, space = 2) => {
|
||||
logSpy(JSON.stringify(value, null, space));
|
||||
logSpy(JSON.stringify(value, null, space > 0 ? space : undefined));
|
||||
});
|
||||
return logSpy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user