mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-10 07:28:06 -05:00
docs: add test should close the connection if no handshake is received (#31)
This commit is contained in:
@@ -704,6 +704,7 @@ const io = new Server(3000, {
|
||||
pingInterval: 300,
|
||||
pingTimeout: 200,
|
||||
maxPayload: 1000000,
|
||||
connectTimeout: 1000,
|
||||
cors: {
|
||||
origin: "*"
|
||||
}
|
||||
|
||||
@@ -507,6 +507,15 @@ describe("Socket.IO protocol", () => {
|
||||
|
||||
await waitFor(socket, "close");
|
||||
});
|
||||
|
||||
|
||||
it("should close the connection if no handshake is received", async () => {
|
||||
const socket = new WebSocket(
|
||||
`${WS_URL}/socket.io/?EIO=4&transport=websocket`
|
||||
);
|
||||
|
||||
await waitFor(socket, "close");
|
||||
});
|
||||
});
|
||||
|
||||
describe("disconnect", () => {
|
||||
|
||||
Reference in New Issue
Block a user