test: tighten echo transcript delivery assertion · openclaw/openclaw@af4213c
shakkernerd
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -113,7 +113,11 @@ function disableImageUnderstanding(cfg: OpenClawConfig): void {
|
113 | 113 | |
114 | 114 | function expectSingleEchoDeliveryCall() { |
115 | 115 | expect(mockDeliverOutboundPayloads).toHaveBeenCalledOnce(); |
116 | | -const callArgs = mockDeliverOutboundPayloads.mock.calls[0]?.[0]; |
| 116 | +const firstCall = mockDeliverOutboundPayloads.mock.calls[0]; |
| 117 | +if (!firstCall) { |
| 118 | +throw new Error("Expected echo transcript delivery call"); |
| 119 | +} |
| 120 | +const callArgs = firstCall[0]; |
117 | 121 | if (!callArgs) { |
118 | 122 | throw new Error("Expected one echo transcript delivery call"); |
119 | 123 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。