test: wait for google chat monitor by assertion · openclaw/openclaw@8d76876
steipete
·
2026-05-12
·
via Recent Commits to openclaw:main
File tree
extensions/googlechat/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -69,13 +69,7 @@ function buildAccount(): ResolvedGoogleChatAccount {
|
69 | 69 | } |
70 | 70 | |
71 | 71 | async function waitForGoogleChatMonitorStarted() { |
72 | | -for (let attempt = 0; attempt < 10; attempt += 1) { |
73 | | -if (hoisted.startGoogleChatMonitor.mock.calls.length === 1) { |
74 | | -return; |
75 | | -} |
76 | | -await new Promise<void>((resolve) => setImmediate(resolve)); |
77 | | -} |
78 | | -expect(hoisted.startGoogleChatMonitor).toHaveBeenCalledOnce(); |
| 72 | +await vi.waitFor(() => expect(hoisted.startGoogleChatMonitor).toHaveBeenCalledOnce()); |
79 | 73 | } |
80 | 74 | |
81 | 75 | describe("googlechat setup", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。