Skip to content

Commit c840bad

Browse files
committedJan 5, 2022
test: fix flaky tests
1 parent f2b8de7 commit c840bad

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎test/socket.io.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ describe("socket.io", () => {
18301830
reconnectionDelay: 100,
18311831
});
18321832
clientSocket.once("connect", () => {
1833-
srv.close(() => {
1833+
sio.close(() => {
18341834
clientSocket.io.on("reconnect", () => {
18351835
clientSocket.emit("ev", "payload");
18361836
});

‎test/uws.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ describe("socket.io with uWebSocket.js-based engine", () => {
4646
});
4747

4848
const partialDone = createPartialDone(done, 4);
49-
io.on("connection", partialDone);
50-
io.of("/custom").on("connection", partialDone);
49+
client.on("connect", partialDone);
50+
clientWSOnly.on("connect", partialDone);
51+
clientPollingOnly.on("connect", partialDone);
52+
clientCustomNamespace.on("connect", partialDone);
5153
});
5254

5355
afterEach(() => {

0 commit comments

Comments
 (0)
Please sign in to comment.