test: guard daemon service mock call · openclaw/openclaw@d2a9b84
steipete
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -37,7 +37,7 @@ function createGatewayParentLikeCommand() {
|
37 | 37 | |
38 | 38 | function expectSingleDaemonCall(mockFn: ReturnType<typeof vi.fn>) { |
39 | 39 | expect(mockFn).toHaveBeenCalledTimes(1); |
40 | | -const opts = mockFn.mock.calls[0]?.[0] as Record<string, unknown> | undefined; |
| 40 | +const opts = mockFn.mock.calls.at(0)?.[0] as Record<string, unknown> | undefined; |
41 | 41 | if (opts === undefined) { |
42 | 42 | throw new Error("expected daemon call options"); |
43 | 43 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。