test: tighten voice call timer timeout assertion · openclaw/openclaw@fb0ea0f
steipete
·
2026-05-10
·
via Recent Commits to openclaw:main
File tree
extensions/voice-call/src/manager
| Original file line number | Diff line number | Diff line change |
|---|
@@ -101,11 +101,9 @@ describe("voice-call manager timers", () => {
|
101 | 101 | |
102 | 102 | const timedOut = waitForFinalTranscript(ctx as never, "call-3").catch((error) => error); |
103 | 103 | await vi.advanceTimersByTimeAsync(1_000); |
104 | | -await expect(timedOut).resolves.toEqual( |
105 | | -expect.objectContaining({ |
106 | | -message: "Timed out waiting for transcript after 1000ms", |
107 | | -}), |
108 | | -); |
| 104 | +const timeoutError = await timedOut; |
| 105 | +expect(timeoutError).toBeInstanceOf(Error); |
| 106 | +expect((timeoutError as Error).message).toBe("Timed out waiting for transcript after 1000ms"); |
109 | 107 | |
110 | 108 | const toClear = waitForFinalTranscript(ctx as never, "call-4"); |
111 | 109 | clearTranscriptWaiter(ctx as never, "call-4"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。