test: guard runtime capture mock calls · openclaw/openclaw@da7f9a6
steipete
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -91,5 +91,5 @@ export function spyRuntimeJson(runtime: Pick<OutputRuntimeEnv, "writeJson">) {
|
91 | 91 | |
92 | 92 | // oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Test helper lets callers ascribe captured JSON shape. |
93 | 93 | export function firstWrittenJsonArg<T>(writeJson: MockCallsWithFirstArg): T | null { |
94 | | -return (writeJson.mock.calls[0]?.[0] ?? null) as T | null; |
| 94 | +return (writeJson.mock.calls.at(0)?.[0] ?? null) as T | null; |
95 | 95 | } |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。