testem 3.5.0 → 3.8.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.
@@ -106,8 +106,8 @@ module.exports = class TeamcityReporter {
106
106
 
107
107
  if (
108
108
  hasError &&
109
- result.error.hasOwnProperty('expected') &&
110
- result.error.hasOwnProperty('actual')
109
+ Object.prototype.hasOwnProperty.call(result.error, 'expected') &&
110
+ Object.prototype.hasOwnProperty.call(result.error, 'actual')
111
111
  ) {
112
112
  attributes.type = 'comparisonFailure';
113
113
  attributes.expected = (result.error.negative ? 'NOT ' : '') + escape(result.error.expected);
@@ -80,7 +80,7 @@ class XUnitReporter {
80
80
  var errorMessage = '';
81
81
  var errorSection = '';
82
82
 
83
- if (error.hasOwnProperty('actual') && error.hasOwnProperty('expected')) {
83
+ if (Object.prototype.hasOwnProperty.call(error, 'actual') && Object.prototype.hasOwnProperty.call(error, 'expected')) {
84
84
  errorMessage = 'Assertion Failed';
85
85
 
86
86
  errorSection += 'Expected:\n';
@@ -15,8 +15,8 @@ function warn(message) {
15
15
  }
16
16
 
17
17
  function hasOldBrowserArgsFormat(args) {
18
- return args.hasOwnProperty('mode') ||
19
- args.hasOwnProperty('args');
18
+ return Object.prototype.hasOwnProperty.call(args, 'mode') ||
19
+ Object.prototype.hasOwnProperty.call(args, 'args');
20
20
  }
21
21
 
22
22
  // Lodash's castArray function will turn `undefined` into `[undefined]`, but we want an empty array in that case.
@@ -37,7 +37,7 @@ module.exports = {
37
37
 
38
38
  if (browserArgs && typeof browserArgs === 'object') {
39
39
  for (browserName in browserArgs) {
40
- if (browserArgs.hasOwnProperty(browserName)) {
40
+ if (Object.prototype.hasOwnProperty.call(browserArgs, browserName)) {
41
41
  let args = browserArgs[browserName];
42
42
 
43
43
  if (typeof args === 'object' && !Array.isArray(args)) {
@@ -249,6 +249,9 @@ module.exports = function knownBrowsers(platform, config) {
249
249
  {
250
250
  name: 'Edge',
251
251
  possiblePath: edgePaths(),
252
+ possibleExe: [
253
+ 'microsoft-edge'
254
+ ],
252
255
  args(config, url) {
253
256
  return chromeArgs(this.browserTmpDir(), url);
254
257
  }
@@ -256,6 +259,9 @@ module.exports = function knownBrowsers(platform, config) {
256
259
  {
257
260
  name: 'Headless Edge',
258
261
  possiblePath: edgePaths(),
262
+ possibleExe: [
263
+ 'microsoft-edge'
264
+ ],
259
265
  args(config, url) {
260
266
  return headlessChromeArgs(this.browserTmpDir(), url);
261
267
  }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "unittest",
8
8
  "browser"
9
9
  ],
10
- "version": "3.5.0",
10
+ "version": "3.8.0",
11
11
  "author": "Toby Ho <airportyh@gmail.com>",
12
12
  "repository": {
13
13
  "type": "git",
@@ -21,13 +21,13 @@
21
21
  },
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@xmldom/xmldom": "^0.7.1",
24
+ "@xmldom/xmldom": "^0.8.0",
25
25
  "backbone": "^1.1.2",
26
26
  "bluebird": "^3.4.6",
27
27
  "charm": "^1.0.0",
28
28
  "commander": "^2.6.0",
29
29
  "compression": "^1.7.4",
30
- "consolidate": "^0.15.1",
30
+ "consolidate": "^0.16.0",
31
31
  "execa": "^1.0.0",
32
32
  "express": "^4.10.7",
33
33
  "fireworm": "^0.7.0",
@@ -39,12 +39,12 @@
39
39
  "lodash.clonedeep": "^4.4.1",
40
40
  "lodash.find": "^4.5.1",
41
41
  "lodash.uniqby": "^4.7.0",
42
- "mkdirp": "^0.5.1",
43
- "mustache": "^3.0.0",
44
- "node-notifier": "^9.0.1",
45
- "npmlog": "^4.0.0",
42
+ "mkdirp": "^1.0.4",
43
+ "mustache": "^4.2.0",
44
+ "node-notifier": "^10.0.0",
45
+ "npmlog": "^6.0.0",
46
46
  "printf": "^0.6.1",
47
- "rimraf": "^2.4.4",
47
+ "rimraf": "^3.0.2",
48
48
  "socket.io": "^4.1.2",
49
49
  "spawn-args": "^0.2.0",
50
50
  "styled_string": "0.0.1",
@@ -70,21 +70,21 @@
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",
77
77
  "cheerio": "^1.0.0-rc.2",
78
78
  "dirty-chai": "^2.0.0",
79
- "eslint": "^5.0.0",
80
- "eslint-plugin-chai-expect": "^2.2.0",
81
- "eslint-plugin-mocha": "^5.0.0",
82
- "mocha": "^8.3.2",
79
+ "eslint": "^8.12.0",
80
+ "eslint-plugin-chai-expect": "^3.0.0",
81
+ "eslint-plugin-mocha": "^10.0.3",
82
+ "mocha": "^9.2.0",
83
83
  "phantomjs": "^2.1.7",
84
84
  "request": "^2.51.0",
85
85
  "saucie": "^3.3.3",
86
86
  "shelljs": "^0.8.2",
87
- "sinon": "^10.0.0",
87
+ "sinon": "^14.0.0",
88
88
  "sinon-chai": "^3.2.0",
89
89
  "socket.io-client": "^4.1.2",
90
90
  "tape": "^5.2.2"
@@ -1,8 +1,9 @@
1
1
  'use strict';
2
+ /* globals module */
2
3
 
3
4
  module.exports = {
4
5
  env: {
5
6
  browser: true,
6
7
  node: false
7
8
  }
8
- }
9
+ };
@@ -7,10 +7,9 @@ The client-side script that reports results back to the Testem server via Socket
7
7
  It also restarts the tests by refreshing the page when instructed by the server to do so.
8
8
 
9
9
  */
10
- /* globals document, window */
11
10
  /* globals module */
12
11
  /* globals jasmineAdapter, jasmine2Adapter, mochaAdapter */
13
- /* globals qunitAdapter, decycle, TestemConfig */
12
+ /* globals qunitAdapter, decycle */
14
13
  /* exported Testem */
15
14
  'use strict';
16
15
 
@@ -1,4 +1,4 @@
1
- /* globals document, parent, io, window, navigator */
1
+ /* globals io */
2
2
  /* globals module */
3
3
  'use strict';
4
4
 
@@ -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);