testem 3.4.1 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -121,15 +121,15 @@ class Server extends EventEmitter {
121
121
  } else {
122
122
  this.server = http.createServer(this.express);
123
123
  }
124
- let ioOptions;
124
+ let ioOptions = {};
125
125
  if (this.config.get('socket_server_options')) {
126
126
  ioOptions = this.config.get('socket_server_options');
127
127
  }
128
+ if (this.config.get('socket_heartbeat_timeout')) {
129
+ ioOptions.pingTimeout = this.config.get('socket_heartbeat_timeout') * 1000;
130
+ }
128
131
  this.io = socketIO(this.server, ioOptions);
129
132
 
130
- let socketHeartbeatTimeout = this.config.get('socket_heartbeat_timeout');
131
- this.io.set('heartbeat timeout', socketHeartbeatTimeout * 1000);
132
-
133
133
  this.io.on('connection', this.onClientConnected.bind(this));
134
134
 
135
135
  this.configureExpress(app);
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "unittest",
8
8
  "browser"
9
9
  ],
10
- "version": "3.4.1",
10
+ "version": "3.4.2",
11
11
  "author": "Toby Ho <airportyh@gmail.com>",
12
12
  "repository": {
13
13
  "type": "git",
@@ -44,7 +44,7 @@
44
44
  "npmlog": "^4.0.0",
45
45
  "printf": "^0.6.1",
46
46
  "rimraf": "^2.4.4",
47
- "socket.io": "^2.1.0",
47
+ "socket.io": "^4.1.2",
48
48
  "spawn-args": "^0.2.0",
49
49
  "styled_string": "0.0.1",
50
50
  "tap-parser": "^7.0.0",
@@ -86,6 +86,7 @@
86
86
  "shelljs": "^0.8.2",
87
87
  "sinon": "^10.0.0",
88
88
  "sinon-chai": "^3.2.0",
89
+ "socket.io-client": "^4.1.2",
89
90
  "tape": "^5.2.2"
90
91
  },
91
92
  "bin": {