diff --git a/src/cli/program/preaction.test.ts b/src/cli/program/preaction.test.ts index ca20c46b52c..c40cc595106 100644 --- a/src/cli/program/preaction.test.ts +++ b/src/cli/program/preaction.test.ts @@ -239,10 +239,6 @@ describe("registerPreActionHooks", () => { processArgv: ["node", "openclaw", "config", "set", "gateway.auth.mode", "{bad", "--json"], }); - const firstCall = ensureConfigReadyMock.mock.calls[0]?.[0] as - | { suppressDoctorStdout?: boolean } - | undefined; - expect(firstCall?.suppressDoctorStdout).toBeUndefined(); expect(ensureConfigReadyMock).toHaveBeenCalledWith({ runtime: runtimeMock, commandPath: ["config", "set"], diff --git a/src/cli/route.test.ts b/src/cli/route.test.ts index 024a4d484ef..6979c4d58ea 100644 --- a/src/cli/route.test.ts +++ b/src/cli/route.test.ts @@ -64,14 +64,9 @@ describe("tryRouteCli", () => { it("does not pass suppressDoctorStdout for routed non-json commands", async () => { await expect(tryRouteCli(["node", "openclaw", "status"])).resolves.toBe(true); - expect(ensureConfigReadyMock).toHaveBeenCalledWith( - expect.objectContaining({ - commandPath: ["status"], - }), - ); - const firstCall = ensureConfigReadyMock.mock.calls[0]?.[0] as - | { suppressDoctorStdout?: boolean } - | undefined; - expect(firstCall?.suppressDoctorStdout).toBeUndefined(); + expect(ensureConfigReadyMock).toHaveBeenCalledWith({ + runtime: expect.any(Object), + commandPath: ["status"], + }); }); });