Closed
Description
🐛 Bug Report
Connect to a socket.io cause an this error:
(node:66998) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '_cookieJar' of null
at resolve (/Users/xxx/node_modules/jsdom/lib/jsdom/living/websockets/WebSoc
ket-impl.js:124:39)
To Reproduce
test('connection', async () => {
const port = await getPort({ port: getPort.makeRange(8080, 65535) })
const io = socketIO(port)
const connection = new Promise(resolve => {
io.on('connection', resolve)
})
const client = socket('http://localhost:' + port)
await connection
})
Expected behavior
no errors log