test: tighten cli assertion checks · openclaw/openclaw@0c22960
steipete
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -112,11 +112,13 @@ describe("nodes-cli coverage", () => {
|
112 | 112 | |
113 | 113 | it("does not register the removed run wrapper", async () => { |
114 | 114 | await withSuppressedStderr(async () => { |
115 | | -await expect( |
116 | | -sharedProgram.parseAsync(["nodes", "run", "--node", "mac-1"], { from: "user" }), |
117 | | -).rejects.toMatchObject({ |
118 | | -code: "commander.unknownCommand", |
119 | | -}); |
| 115 | +let error: { code?: unknown } | undefined; |
| 116 | +try { |
| 117 | +await sharedProgram.parseAsync(["nodes", "run", "--node", "mac-1"], { from: "user" }); |
| 118 | +} catch (err) { |
| 119 | +error = err as { code?: unknown }; |
| 120 | +} |
| 121 | +expect(error?.code).toBe("commander.unknownCommand"); |
120 | 122 | }); |
121 | 123 | }); |
122 | 124 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。