test: dedupe command mock call reads · openclaw/openclaw@28b19f4
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -31,7 +31,7 @@ function requireMockCall(
|
31 | 31 | callIndex: number, |
32 | 32 | label: string, |
33 | 33 | ): unknown[] { |
34 | | -const call = mock.mock.calls.at(callIndex); |
| 34 | +const call = mock.mock.calls[callIndex]; |
35 | 35 | if (!call) { |
36 | 36 | throw new Error(`expected ${label} call ${callIndex}`); |
37 | 37 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -34,7 +34,7 @@ function createRuntimeCapture(): RuntimeEnv {
|
34 | 34 | } |
35 | 35 | |
36 | 36 | function requireRuntimeJsonPayload(runtime: RuntimeEnv, index = 0): unknown { |
37 | | -const call = mocks.writeRuntimeJson.mock.calls.at(index); |
| 37 | +const call = mocks.writeRuntimeJson.mock.calls[index]; |
38 | 38 | if (!call) { |
39 | 39 | throw new Error(`expected writeRuntimeJson call ${index}`); |
40 | 40 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。