testem 3.2.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.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const indent = require('../utils/strutils').indent;
|
|
4
4
|
const printf = require('printf');
|
|
5
|
+
const displayutils = require('../utils/displayutils');
|
|
5
6
|
|
|
6
7
|
module.exports = class DotReporter {
|
|
7
8
|
constructor(silent, out) {
|
|
@@ -98,7 +99,11 @@ module.exports = class DotReporter {
|
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
summaryDisplay() {
|
|
101
|
-
|
|
102
|
+
let lines = [
|
|
103
|
+
`[duration - ${this.duration()} ms]`,
|
|
104
|
+
displayutils.summaryDisplay.call(this),
|
|
105
|
+
];
|
|
106
|
+
return lines.join('\n');
|
|
102
107
|
}
|
|
103
108
|
|
|
104
109
|
duration() {
|
|
@@ -38,20 +38,7 @@ module.exports = class TapReporter {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
summaryDisplay() {
|
|
41
|
-
|
|
42
|
-
'1..' + this.total,
|
|
43
|
-
'# tests ' + this.total,
|
|
44
|
-
'# pass ' + this.pass,
|
|
45
|
-
'# skip ' + this.skipped,
|
|
46
|
-
'# todo ' + this.todo,
|
|
47
|
-
'# fail ' + (this.total - this.pass - this.skipped - this.todo)
|
|
48
|
-
];
|
|
49
|
-
|
|
50
|
-
if (this.pass + this.skipped + this.todo === this.total) {
|
|
51
|
-
lines.push('');
|
|
52
|
-
lines.push('# ok');
|
|
53
|
-
}
|
|
54
|
-
return lines.join('\n');
|
|
41
|
+
return displayutils.summaryDisplay.call(this);
|
|
55
42
|
}
|
|
56
43
|
|
|
57
44
|
/*
|
package/lib/server/index.js
CHANGED
|
@@ -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);
|
|
@@ -93,3 +93,22 @@ function resultString(id, prefix, result, quietLogs, strictSpecCompliance) {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
exports.resultString = resultString;
|
|
96
|
+
|
|
97
|
+
function summaryDisplay() {
|
|
98
|
+
let lines = [
|
|
99
|
+
'1..' + this.total,
|
|
100
|
+
'# tests ' + this.total,
|
|
101
|
+
'# pass ' + this.pass,
|
|
102
|
+
'# skip ' + this.skipped,
|
|
103
|
+
'# todo ' + this.todo,
|
|
104
|
+
'# fail ' + (this.total - this.pass - this.skipped - this.todo)
|
|
105
|
+
];
|
|
106
|
+
|
|
107
|
+
if (this.pass + this.skipped + this.todo === this.total) {
|
|
108
|
+
lines.push('');
|
|
109
|
+
lines.push('# ok');
|
|
110
|
+
}
|
|
111
|
+
return lines.join('\n');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
exports.summaryDisplay = summaryDisplay;
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"unittest",
|
|
8
8
|
"browser"
|
|
9
9
|
],
|
|
10
|
-
"version": "3.2
|
|
10
|
+
"version": "3.4.2",
|
|
11
11
|
"author": "Toby Ho <airportyh@gmail.com>",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"mustache": "^3.0.0",
|
|
43
43
|
"node-notifier": "^9.0.1",
|
|
44
44
|
"npmlog": "^4.0.0",
|
|
45
|
-
"printf": "^0.
|
|
45
|
+
"printf": "^0.6.1",
|
|
46
46
|
"rimraf": "^2.4.4",
|
|
47
|
-
"socket.io": "^
|
|
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",
|
|
51
51
|
"tmp": "0.0.33",
|
|
52
|
-
"xmldom": "^0.
|
|
52
|
+
"xmldom": "^0.6.0"
|
|
53
53
|
},
|
|
54
54
|
"files": [
|
|
55
55
|
"lib",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
],
|
|
63
63
|
"scripts": {
|
|
64
64
|
"install:all": "npm install && npm install phantomjs-prebuilt",
|
|
65
|
-
"test": "mocha
|
|
65
|
+
"test": "mocha tests/*_tests.js tests/**/*_tests.js",
|
|
66
66
|
"cover": "cover run ./node_modules/.bin/_mocha tests/*_tests.js tests/**/*_tests.js; cover report html; open cover_html/index.html",
|
|
67
67
|
"integration": "node ./bin/run-integration.js",
|
|
68
68
|
"browser-tests": "cd examples/saucelabs/ && ../../testem.js ci -d",
|
|
@@ -79,13 +79,14 @@
|
|
|
79
79
|
"eslint": "^5.0.0",
|
|
80
80
|
"eslint-plugin-chai-expect": "^2.2.0",
|
|
81
81
|
"eslint-plugin-mocha": "^5.0.0",
|
|
82
|
-
"mocha": "^3.
|
|
82
|
+
"mocha": "^8.3.2",
|
|
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": "^
|
|
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": {
|