test: tighten discord startup delay assertion

This commit is contained in:
Peter Steinberger
2026-05-09 05:19:17 +01:00
parent df4aaaecfa
commit 2ee51f4826

View File

@@ -655,8 +655,12 @@ describe("discordPlugin outbound", () => {
expect(sleepWithAbortMock).not.toHaveBeenCalled();
// Second account (index 1) — 10s delay
await startDiscordAccount(cfg, "zeta");
expect(sleepWithAbortMock).toHaveBeenCalledWith(10_000, expect.any(Object));
const zetaContext = createStartAccountContext({
account: resolveAccount(cfg, "zeta"),
cfg,
});
await discordPlugin.gateway!.startAccount!(zetaContext);
expect(sleepWithAbortMock).toHaveBeenCalledWith(10_000, zetaContext.abortSignal);
});
});