Open Totodore opened 1 year ago
Here is a PR to add a socket.io protocol v4 test suite.
Closes #30
The only thing I'm not sure is this test :
it("should disallow connection to an unknown namespace", async () => { const socket = new WebSocket( `${WS_URL}/socket.io/?EIO=3&transport=websocket` ); await waitFor(socket, "message"); // Engine.IO handshake await waitFor(socket, "message"); // Socket.IO / namespace handshake await waitFor(socket, "message"); // auth packet socket.send("40/random"); const { data } = await waitFor(socket, "message"); // Should I expect "Invalid namespace" or "{ "message": "Invalid namespace" }" expect(data).to.eql('44/random,Invalid namespace'); });
Here is a PR to add a socket.io protocol v4 test suite.
Closes #30
The only thing I'm not sure is this test :