test(cli): align run-main primary registration expectations · openclaw/openclaw@6a338ba
steipete
·
2026-04-28
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -297,7 +297,11 @@ describe("runCli exit behavior", () => {
|
297 | 297 | |
298 | 298 | await expect(runCli(["node", "openclaw", "status"])).resolves.toBeUndefined(); |
299 | 299 | |
300 | | -expect(registerSubCliByNameMock).toHaveBeenCalledWith(expect.anything(), "status"); |
| 300 | +expect(registerSubCliByNameMock).toHaveBeenCalledWith(expect.anything(), "status", [ |
| 301 | +"node", |
| 302 | +"openclaw", |
| 303 | +"status", |
| 304 | +]); |
301 | 305 | expect(process.exitCode).toBe(1); |
302 | 306 | process.exitCode = exitCode; |
303 | 307 | }); |
@@ -318,7 +322,12 @@ describe("runCli exit behavior", () => {
|
318 | 322 | "doctor", |
319 | 323 | "--help", |
320 | 324 | ]); |
321 | | -expect(registerSubCliByNameMock).toHaveBeenCalledWith(expect.anything(), "doctor"); |
| 325 | +expect(registerSubCliByNameMock).toHaveBeenCalledWith(expect.anything(), "doctor", [ |
| 326 | +"node", |
| 327 | +"openclaw", |
| 328 | +"doctor", |
| 329 | +"--help", |
| 330 | +]); |
322 | 331 | }); |
323 | 332 | |
324 | 333 | it("restores terminal state before uncaught CLI exits", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。