@wdio/reporter 7.14.1 → 7.16.11
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.
- package/build/index.js +5 -5
- package/build/stats/runner.js +1 -1
- package/build/stats/suite.d.ts +2 -0
- package/build/stats/suite.d.ts.map +1 -1
- package/build/stats/suite.js +1 -0
- package/build/stats/test.js +7 -7
- package/package.json +5 -5
package/build/index.js
CHANGED
|
@@ -38,11 +38,11 @@ class WDIOReporter extends events_1.EventEmitter {
|
|
|
38
38
|
this.specs = [];
|
|
39
39
|
// ensure the report directory exists
|
|
40
40
|
if (this.options.outputDir) {
|
|
41
|
-
fs_extra_1.ensureDirSync(this.options.outputDir);
|
|
41
|
+
(0, fs_extra_1.ensureDirSync)(this.options.outputDir);
|
|
42
42
|
}
|
|
43
43
|
this.outputStream = (this.options.stdout || !this.options.logFile) && this.options.writeStream
|
|
44
44
|
? this.options.writeStream
|
|
45
|
-
: fs_extra_1.createWriteStream(this.options.logFile);
|
|
45
|
+
: (0, fs_extra_1.createWriteStream)(this.options.logFile);
|
|
46
46
|
let currentTest;
|
|
47
47
|
const rootSuite = new suite_1.default({
|
|
48
48
|
title: '(root)',
|
|
@@ -86,7 +86,7 @@ class WDIOReporter extends events_1.EventEmitter {
|
|
|
86
86
|
});
|
|
87
87
|
this.on('hook:end', /* istanbul ignore next */ (hook) => {
|
|
88
88
|
const hookStats = this.hooks[hook.uid];
|
|
89
|
-
hookStats.complete(utils_1.getErrorsFromEvent(hook));
|
|
89
|
+
hookStats.complete((0, utils_1.getErrorsFromEvent)(hook));
|
|
90
90
|
this.counts.hooks++;
|
|
91
91
|
this.onHookEnd(hookStats);
|
|
92
92
|
});
|
|
@@ -108,14 +108,14 @@ class WDIOReporter extends events_1.EventEmitter {
|
|
|
108
108
|
});
|
|
109
109
|
this.on('test:fail', /* istanbul ignore next */ (test) => {
|
|
110
110
|
const testStat = this.tests[test.uid];
|
|
111
|
-
testStat.fail(utils_1.getErrorsFromEvent(test));
|
|
111
|
+
testStat.fail((0, utils_1.getErrorsFromEvent)(test));
|
|
112
112
|
this.counts.failures++;
|
|
113
113
|
this.counts.tests++;
|
|
114
114
|
this.onTestFail(testStat);
|
|
115
115
|
});
|
|
116
116
|
this.on('test:retry', (test) => {
|
|
117
117
|
const testStat = this.tests[test.uid];
|
|
118
|
-
testStat.fail(utils_1.getErrorsFromEvent(test));
|
|
118
|
+
testStat.fail((0, utils_1.getErrorsFromEvent)(test));
|
|
119
119
|
this.onTestRetry(testStat);
|
|
120
120
|
this.retries++;
|
|
121
121
|
});
|
package/build/stats/runner.js
CHANGED
|
@@ -14,7 +14,7 @@ class RunnerStats extends runnable_1.default {
|
|
|
14
14
|
super('runner');
|
|
15
15
|
this.cid = runner.cid;
|
|
16
16
|
this.capabilities = runner.capabilities;
|
|
17
|
-
this.sanitizedCapabilities = utils_1.sanitizeCaps(runner.capabilities);
|
|
17
|
+
this.sanitizedCapabilities = (0, utils_1.sanitizeCaps)(runner.capabilities);
|
|
18
18
|
this.config = runner.config;
|
|
19
19
|
this.specs = runner.specs;
|
|
20
20
|
this.sessionId = runner.sessionId;
|
package/build/stats/suite.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export interface Suite {
|
|
|
15
15
|
uid?: string;
|
|
16
16
|
tags?: string[] | Tag[];
|
|
17
17
|
description?: string;
|
|
18
|
+
rule?: string;
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
21
|
* Class describing statistics about a single suite.
|
|
@@ -35,6 +36,7 @@ export default class SuiteStats extends RunnableStats {
|
|
|
35
36
|
*/
|
|
36
37
|
hooksAndTests: (HookStats | TestStats)[];
|
|
37
38
|
description?: string;
|
|
39
|
+
rule?: string;
|
|
38
40
|
constructor(suite: Suite);
|
|
39
41
|
}
|
|
40
42
|
//# sourceMappingURL=suite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suite.d.ts","sourceRoot":"","sources":["../../src/stats/suite.ts"],"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AAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,aAAa;IACjD,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,EAAE,CAAA;IACvB,KAAK,EAAE,SAAS,EAAE,CAAK;IACvB,KAAK,EAAE,SAAS,EAAE,CAAK;IACvB,MAAM,EAAE,UAAU,EAAE,CAAK;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,aAAa,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,EAAE,CAAK;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;gBAEA,KAAK,EAAE,KAAK;CAe5B"}
|
package/build/stats/suite.js
CHANGED
package/build/stats/test.js
CHANGED
|
@@ -62,13 +62,13 @@ class TestStats extends runnable_1.default {
|
|
|
62
62
|
}
|
|
63
63
|
_stringifyDiffObjs(err) {
|
|
64
64
|
const inspectOpts = { maxStringLength };
|
|
65
|
-
const expected = object_inspect_1.default(err.expected, inspectOpts);
|
|
66
|
-
const actual = object_inspect_1.default(err.actual, inspectOpts);
|
|
67
|
-
let msg = diff_1.diffWordsWithSpace(actual, expected)
|
|
65
|
+
const expected = (0, object_inspect_1.default)(err.expected, inspectOpts);
|
|
66
|
+
const actual = (0, object_inspect_1.default)(err.actual, inspectOpts);
|
|
67
|
+
let msg = (0, diff_1.diffWordsWithSpace)(actual, expected)
|
|
68
68
|
.map((str) => (str.added
|
|
69
|
-
? utils_1.colorLines('diff added inline', str.value)
|
|
69
|
+
? (0, utils_1.colorLines)('diff added inline', str.value)
|
|
70
70
|
: str.removed
|
|
71
|
-
? utils_1.colorLines('diff removed inline', str.value)
|
|
71
|
+
? (0, utils_1.colorLines)('diff removed inline', str.value)
|
|
72
72
|
: str.value))
|
|
73
73
|
.join('');
|
|
74
74
|
// linenos
|
|
@@ -77,12 +77,12 @@ class TestStats extends runnable_1.default {
|
|
|
77
77
|
const width = String(lines.length).length;
|
|
78
78
|
msg = lines
|
|
79
79
|
.map(function (str, i) {
|
|
80
|
-
return utils_1.pad(String(++i), width) + ' |' + ' ' + str;
|
|
80
|
+
return (0, utils_1.pad)(String(++i), width) + ' |' + ' ' + str;
|
|
81
81
|
})
|
|
82
82
|
.join('\n');
|
|
83
83
|
}
|
|
84
84
|
// legend
|
|
85
|
-
msg = `\n${utils_1.color('diff removed inline', 'actual')} ${utils_1.color('diff added inline', 'expected')}\n\n${msg}\n`;
|
|
85
|
+
msg = `\n${(0, utils_1.color)('diff removed inline', 'actual')} ${(0, utils_1.color)('diff added inline', 'expected')}\n\n${msg}\n`;
|
|
86
86
|
// indent
|
|
87
87
|
msg = msg.replace(/^/gm, ' ');
|
|
88
88
|
const newError = new Error(err.message + msg);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/reporter",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.16.11",
|
|
4
4
|
"description": "A WebdriverIO utility to help reporting all events",
|
|
5
5
|
"author": "Christian Bromann <christian@saucelabs.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-reporter",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/fs-extra": "^9.0.1",
|
|
26
|
-
"@types/tmp": "^0.2.0",
|
|
27
26
|
"tmp": "^0.2.0"
|
|
28
27
|
},
|
|
29
28
|
"publishConfig": {
|
|
@@ -31,15 +30,16 @@
|
|
|
31
30
|
},
|
|
32
31
|
"dependencies": {
|
|
33
32
|
"@types/diff": "^5.0.0",
|
|
34
|
-
"@types/node": "^
|
|
33
|
+
"@types/node": "^16.11.1",
|
|
35
34
|
"@types/object-inspect": "^1.8.0",
|
|
36
35
|
"@types/supports-color": "^8.1.0",
|
|
37
|
-
"@
|
|
36
|
+
"@types/tmp": "^0.2.0",
|
|
37
|
+
"@wdio/types": "7.16.11",
|
|
38
38
|
"diff": "^5.0.0",
|
|
39
39
|
"fs-extra": "^10.0.0",
|
|
40
40
|
"object-inspect": "^1.10.3",
|
|
41
41
|
"supports-color": "8.1.1"
|
|
42
42
|
},
|
|
43
43
|
"types": "./build/index.d.ts",
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "7aa1d82a1590b47db444734dc86fae7bca1c777c"
|
|
45
45
|
}
|