Skip to content

Commit

Permalink
tests: increase failing test waitFor timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
thecristen committed Sep 28, 2023
1 parent 52539ee commit 7001f18
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions apps/site/assets/ts/app/__tests__/channels-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,15 @@ describe("setupChannels", () => {
//private property. force the WebSocket closed!
window.socket.conn.close();

await waitFor(() => {
expect(reloadMock).toHaveBeenCalled();
expect(consoleMock).toHaveBeenCalledWith(
"Socket was forced closed by the browser -- reloading to establish WebSocket connection."
);
});
await waitFor(
() => {
expect(reloadMock).toHaveBeenCalled();
expect(consoleMock).toHaveBeenCalledWith(
"Socket was forced closed by the browser -- reloading to establish WebSocket connection."
);
},
{ timeout: 5000 }
);

jest.restoreAllMocks();
});
Expand Down

0 comments on commit 7001f18

Please sign in to comment.