mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:40:44 +00:00
test(cli): align run-main primary registration expectations
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user