test: dedupe feishu cleanup mock reads · openclaw/openclaw@a661b7b
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -38,11 +38,11 @@ function createWsClient(): MockWsClient {
|
38 | 38 | } |
39 | 39 | |
40 | 40 | function firstRuntimeError(runtime: { error: ReturnType<typeof vi.fn> }): string { |
41 | | -return String(runtime.error.mock.calls.at(0)?.at(0) ?? ""); |
| 41 | +return String(runtime.error.mock.calls[0]?.[0] ?? ""); |
42 | 42 | } |
43 | 43 | |
44 | 44 | function firstWsCallbacks(): { onError?: (err: Error) => void } { |
45 | | -const callbacks = createFeishuWSClientMock.mock.calls.at(0)?.at(1); |
| 45 | +const callbacks = createFeishuWSClientMock.mock.calls[0]?.[1]; |
46 | 46 | if (!callbacks || typeof callbacks !== "object") { |
47 | 47 | throw new Error("expected Feishu websocket callbacks"); |
48 | 48 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。