test: dedupe message command mock reads · openclaw/openclaw@c4d4e5d
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -17,7 +17,7 @@ type RunMessageActionParams = {
|
17 | 17 | |
18 | 18 | function readOnlyMessageActionCall(): RunMessageActionParams { |
19 | 19 | expect(runMessageActionMock).toHaveBeenCalledOnce(); |
20 | | -const call = runMessageActionMock.mock.calls.at(0)?.[0]; |
| 20 | +const call = runMessageActionMock.mock.calls[0]?.[0]; |
21 | 21 | if (!call) { |
22 | 22 | throw new Error("Expected message action call"); |
23 | 23 | } |
@@ -208,7 +208,7 @@ describe("messageCommand", () => {
|
208 | 208 | expect(actionCall.gateway?.clientName).toBe("cli"); |
209 | 209 | expect(actionCall.gateway?.mode).toBe("cli"); |
210 | 210 | expect(actionCall.cfg).not.toBe(rawConfig); |
211 | | -const configResolutionCall = resolveCommandConfigWithSecrets.mock.calls.at(0)?.[0] as { |
| 211 | +const configResolutionCall = resolveCommandConfigWithSecrets.mock.calls[0]?.[0] as { |
212 | 212 | commandName?: string; |
213 | 213 | config?: unknown; |
214 | 214 | targetIds?: Set<string>; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。