test: guard daemon cli mock calls · openclaw/openclaw@81d973e
steipete
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -256,10 +256,11 @@ describe("daemon-cli coverage", () => {
|
256 | 256 | await runDaemonCommand(["daemon", "status", "--deep"]); |
257 | 257 | |
258 | 258 | expect(findExtraGatewayServices).toHaveBeenCalledTimes(1); |
259 | | -if (findExtraGatewayServices.mock.calls[0]?.[0] === undefined) { |
| 259 | +const discoveryCall = findExtraGatewayServices.mock.calls.at(0); |
| 260 | +if (discoveryCall?.[0] === undefined) { |
260 | 261 | throw new Error("Expected gateway service discovery params"); |
261 | 262 | } |
262 | | -expect(findExtraGatewayServices.mock.calls[0]?.[1]).toEqual({ deep: true }); |
| 263 | +expect(discoveryCall[1]).toEqual({ deep: true }); |
263 | 264 | }); |
264 | 265 | |
265 | 266 | it("installs the daemon (json output)", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。