test: dedupe server channels mock reads · openclaw/openclaw@37d01fd
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -125,7 +125,7 @@ async function waitForMicrotaskCondition(
|
125 | 125 | } |
126 | 126 | |
127 | 127 | function firstSleepWithAbortCall(): [number, AbortSignal | undefined] { |
128 | | -const call = hoisted.sleepWithAbort.mock.calls.at(0); |
| 128 | +const call = hoisted.sleepWithAbort.mock.calls[0]; |
129 | 129 | if (!call) { |
130 | 130 | throw new Error("expected sleepWithAbort call"); |
131 | 131 | } |
@@ -135,7 +135,7 @@ function firstSleepWithAbortCall(): [number, AbortSignal | undefined] {
|
135 | 135 | function firstStartAccountContext( |
136 | 136 | startAccount: ReturnType<typeof vi.fn>, |
137 | 137 | ): ChannelGatewayContext<TestAccount> { |
138 | | -const ctx = startAccount.mock.calls.at(0)?.at(0); |
| 138 | +const ctx = startAccount.mock.calls[0]?.[0]; |
139 | 139 | if (!ctx || typeof ctx !== "object") { |
140 | 140 | throw new Error("expected channel start context"); |
141 | 141 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。