From 6a338ba67d9de06f7320d776ed22381e618e492f Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 28 Apr 2026 02:14:23 +0100 Subject: [PATCH] test(cli): align run-main primary registration expectations --- src/cli/run-main.exit.test.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/cli/run-main.exit.test.ts b/src/cli/run-main.exit.test.ts index 36ae45286b0..a05a1d31f76 100644 --- a/src/cli/run-main.exit.test.ts +++ b/src/cli/run-main.exit.test.ts @@ -297,7 +297,11 @@ describe("runCli exit behavior", () => { await expect(runCli(["node", "openclaw", "status"])).resolves.toBeUndefined(); - expect(registerSubCliByNameMock).toHaveBeenCalledWith(expect.anything(), "status"); + expect(registerSubCliByNameMock).toHaveBeenCalledWith(expect.anything(), "status", [ + "node", + "openclaw", + "status", + ]); expect(process.exitCode).toBe(1); process.exitCode = exitCode; }); @@ -318,7 +322,12 @@ describe("runCli exit behavior", () => { "doctor", "--help", ]); - expect(registerSubCliByNameMock).toHaveBeenCalledWith(expect.anything(), "doctor"); + expect(registerSubCliByNameMock).toHaveBeenCalledWith(expect.anything(), "doctor", [ + "node", + "openclaw", + "doctor", + "--help", + ]); }); it("restores terminal state before uncaught CLI exits", async () => {