testem 3.4.1 → 3.6.0

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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var XmlDom = require('xmldom');
3
+ var XmlDom = require('@xmldom/xmldom');
4
4
  var indent = require('../utils/strutils').indent;
5
5
 
6
6
  class XUnitReporter {
@@ -248,7 +248,7 @@ module.exports = class BrowserTestRunner {
248
248
  error: {}
249
249
  });
250
250
  this.onAllTestResults();
251
- this.onEnd.call(this);
251
+ this.finish();
252
252
  }
253
253
  }
254
254
 
@@ -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.6.0",
11
11
  "author": "Toby Ho <airportyh@gmail.com>",
12
12
  "repository": {
13
13
  "type": "git",
@@ -21,6 +21,7 @@
21
21
  },
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
+ "@xmldom/xmldom": "^0.7.1",
24
25
  "backbone": "^1.1.2",
25
26
  "bluebird": "^3.4.6",
26
27
  "charm": "^1.0.0",
@@ -44,12 +45,11 @@
44
45
  "npmlog": "^4.0.0",
45
46
  "printf": "^0.6.1",
46
47
  "rimraf": "^2.4.4",
47
- "socket.io": "^2.1.0",
48
+ "socket.io": "^4.1.2",
48
49
  "spawn-args": "^0.2.0",
49
50
  "styled_string": "0.0.1",
50
51
  "tap-parser": "^7.0.0",
51
- "tmp": "0.0.33",
52
- "xmldom": "^0.6.0"
52
+ "tmp": "0.0.33"
53
53
  },
54
54
  "files": [
55
55
  "lib",
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "devDependencies": {
72
72
  "bluebird-retry": "^0.11.0",
73
- "browserify": "^16.2.2",
73
+ "browserify": "^17.0.0",
74
74
  "chai": "^4.0.2",
75
75
  "chai-files": "^1.2.0",
76
76
  "chai-shallow-deep-equal": "^1.4.4",
@@ -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": {
@@ -164,7 +164,7 @@ function init() {
164
164
  }
165
165
 
166
166
  function patchEmitterForWildcard(socket) {
167
- var emit = io.Manager.prototype.emit;
167
+ var emit = Object.getPrototypeOf(socket.io).emit;
168
168
 
169
169
  function onevent(packet) {
170
170
  var args = packet.data || [];
@@ -175,7 +175,7 @@ function patchEmitterForWildcard(socket) {
175
175
  }
176
176
 
177
177
  function initSocket(id) {
178
- socket = io.connect({ reconnectionDelayMax: 1000, randomizationFactor: 0 });
178
+ socket = io({ reconnectionDelayMax: 1000, randomizationFactor: 0 });
179
179
  patchEmitterForWildcard(socket);
180
180
 
181
181
  socket.emit('browser-login', getBrowserName(navigator.userAgent), id);
package/CHANGELOG.md DELETED
@@ -1 +0,0 @@
1
- See https://github.com/testem/testem/releases