testem 2.8.2 → 2.9.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.
|
@@ -80,8 +80,8 @@ module.exports = class DotReporter {
|
|
|
80
80
|
|
|
81
81
|
if ('expected' in error && 'actual' in error) {
|
|
82
82
|
printf(this.out, '\n' +
|
|
83
|
-
' expected: %O\n' +
|
|
84
|
-
' actual: %O\n', error.expected, error.actual);
|
|
83
|
+
' expected: %s%O\n' +
|
|
84
|
+
' actual: %O\n', (error.negative ? 'NOT ' : ''), error.expected, error.actual);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
if (error.stack) {
|
|
@@ -110,7 +110,7 @@ module.exports = class TeamcityReporter {
|
|
|
110
110
|
result.error.hasOwnProperty('actual')
|
|
111
111
|
) {
|
|
112
112
|
attributes.type = 'comparisonFailure';
|
|
113
|
-
attributes.expected = escape(result.error.expected);
|
|
113
|
+
attributes.expected = (result.error.negative ? 'NOT ' : '') + escape(result.error.expected);
|
|
114
114
|
attributes.actual = escape(result.error.actual);
|
|
115
115
|
}
|
|
116
116
|
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"unittest",
|
|
8
8
|
"browser"
|
|
9
9
|
],
|
|
10
|
-
"version": "2.
|
|
10
|
+
"version": "2.9.0",
|
|
11
11
|
"author": "Toby Ho <airportyh@gmail.com>",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"chai-shallow-deep-equal": "^1.4.4",
|
|
76
76
|
"cheerio": "^1.0.0-rc.2",
|
|
77
77
|
"dirty-chai": "^2.0.0",
|
|
78
|
-
"eslint": "^
|
|
78
|
+
"eslint": "^5.0.0",
|
|
79
79
|
"eslint-plugin-chai-expect": "^1.1.1",
|
|
80
80
|
"eslint-plugin-mocha": "^5.0.0",
|
|
81
81
|
"mocha": "^3.0.0",
|
|
@@ -409,5 +409,15 @@ function emit() {
|
|
|
409
409
|
|
|
410
410
|
if (typeof window !== 'undefined') {
|
|
411
411
|
window.Testem = Testem;
|
|
412
|
+
|
|
413
|
+
// Stub window.alert and window.confirm to throw error so alert and confirm does not get used in tests
|
|
414
|
+
// this will prevent browser disconnect failures
|
|
415
|
+
window.alert = function() {
|
|
416
|
+
throw new Error('[Testem] Calling window.alert() in tests is disabled, because it causes testem to fail with browser disconnect error.');
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
window.confirm = function() {
|
|
420
|
+
throw new Error('[Testem] Calling window.confirm() in tests is disabled, because it causes testem to fail with browser disconnect error.');
|
|
421
|
+
}
|
|
412
422
|
init();
|
|
413
423
|
}
|