test(discord): drive application id retry timer · openclaw/openclaw@d927e73
steipete
·
2026-05-31
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -64,9 +64,11 @@ describe("resolveDiscordPrivilegedIntentsFromFlags", () => {
|
64 | 64 | return jsonResponse({ id: "app-1" }); |
65 | 65 | }); |
66 | 66 | |
67 | | -await expect(fetchDiscordApplicationId("unparseable.token", 1_000, fetcher)).resolves.toBe( |
68 | | -"app-1", |
69 | | -); |
| 67 | +vi.useFakeTimers(); |
| 68 | +const lookup = fetchDiscordApplicationId("unparseable.token", 1_000, fetcher); |
| 69 | +await vi.runAllTimersAsync(); |
| 70 | + |
| 71 | +await expect(lookup).resolves.toBe("app-1"); |
70 | 72 | expect(calls).toBe(2); |
71 | 73 | }); |
72 | 74 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。