Skip to content

Commit

Permalink
test: fix flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Jan 5, 2022
1 parent f2b8de7 commit c840bad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/socket.io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1830,7 +1830,7 @@ describe("socket.io", () => {
reconnectionDelay: 100,
});
clientSocket.once("connect", () => {
srv.close(() => {
sio.close(() => {
clientSocket.io.on("reconnect", () => {
clientSocket.emit("ev", "payload");
});
Expand Down
6 changes: 4 additions & 2 deletions test/uws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ describe("socket.io with uWebSocket.js-based engine", () => {
});

const partialDone = createPartialDone(done, 4);
io.on("connection", partialDone);
io.of("/custom").on("connection", partialDone);
client.on("connect", partialDone);
clientWSOnly.on("connect", partialDone);
clientPollingOnly.on("connect", partialDone);
clientCustomNamespace.on("connect", partialDone);
});

afterEach(() => {
Expand Down

0 comments on commit c840bad

Please sign in to comment.