fix(feishu): await websocket startup in cleanup test

This commit is contained in:
Vincent Koc
2026-04-06 16:16:45 +01:00
parent 514328a9ad
commit d425aa0912

View File

@@ -65,8 +65,10 @@ describe("feishu websocket cleanup", () => {
eventDispatcher: {} as never,
});
expect(wsClient.start).toHaveBeenCalledTimes(1);
expect(wsClients.get(accountId)).toBe(wsClient);
await vi.waitFor(() => {
expect(wsClient.start).toHaveBeenCalledTimes(1);
expect(wsClients.get(accountId)).toBe(wsClient);
});
abortController.abort();
await monitorPromise;