Skip to content

Commit f0f6dd7

Browse files
committed
Fix close socket after test
1 parent fcf387a commit f0f6dd7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "SocketIO client running inside a shared WebWorker thread",
55
"main": "index.js",
66
"scripts": {
7-
"test": "mocha",
7+
"test": "mocha test/*.test.js",
88
"test:e2e": "npx cypress open",
99
"start": "node server.js",
1010
"start:io": "node server.js",

test/socket.io-worker.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ describe('socket.io-worker', () => {
1616

1717
ws.on('message', event => {
1818
assert(event === hello)
19+
if (ws.socket) ws.socket.close() // @todo fix
1920
done()
2021
})
2122
})

0 commit comments

Comments
 (0)