test: tighten discord startup delay assertion · openclaw/openclaw@2ee51f4
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -655,8 +655,12 @@ describe("discordPlugin outbound", () => {
|
655 | 655 | expect(sleepWithAbortMock).not.toHaveBeenCalled(); |
656 | 656 | |
657 | 657 | // Second account (index 1) — 10s delay |
658 | | -await startDiscordAccount(cfg, "zeta"); |
659 | | -expect(sleepWithAbortMock).toHaveBeenCalledWith(10_000, expect.any(Object)); |
| 658 | +const zetaContext = createStartAccountContext({ |
| 659 | +account: resolveAccount(cfg, "zeta"), |
| 660 | + cfg, |
| 661 | +}); |
| 662 | +await discordPlugin.gateway!.startAccount!(zetaContext); |
| 663 | +expect(sleepWithAbortMock).toHaveBeenCalledWith(10_000, zetaContext.abortSignal); |
660 | 664 | }); |
661 | 665 | }); |
662 | 666 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。