test: guard context engine mock args · openclaw/openclaw@0bb4ef5
steipete
·
2026-05-12
·
via Recent Commits to openclaw:main
File tree
src/agents/pi-embedded-runner/run
| Original file line number | Diff line number | Diff line change |
|---|
@@ -79,6 +79,9 @@ function mockArg(source: MockCallSource, callIndex: number, argIndex: number, la
|
79 | 79 | if (!call) { |
80 | 80 | throw new Error(`expected mock call: ${label}`); |
81 | 81 | } |
| 82 | +if (argIndex >= call.length) { |
| 83 | +throw new Error(`expected mock call argument ${argIndex}: ${label}`); |
| 84 | +} |
82 | 85 | return call[argIndex]; |
83 | 86 | } |
84 | 87 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。