mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Add tests for results with React component names
This commit is contained in:
parent
c1926959e2
commit
7aa575a237
5 changed files with 70 additions and 1 deletions
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
|
|
@ -1212,7 +1212,7 @@ class JestJunitParser {
|
|||
const suites = junit.testsuites.testsuite === undefined
|
||||
? []
|
||||
: junit.testsuites.testsuite.map(ts => {
|
||||
const name = ts.$.name.trim();
|
||||
const name = this.escapeCharacters(ts.$.name.trim());
|
||||
const time = parseFloat(ts.$.time) * 1000;
|
||||
const sr = new test_results_1.TestSuiteResult(name, this.getGroups(ts), time);
|
||||
return sr;
|
||||
|
|
@ -1281,6 +1281,9 @@ class JestJunitParser {
|
|||
var _a, _b;
|
||||
return ((_b = (_a = this.options.workDir) !== null && _a !== void 0 ? _a : this.assumedWorkDir) !== null && _b !== void 0 ? _b : (this.assumedWorkDir = (0, path_utils_1.getBasePath)(path, this.options.trackedFiles)));
|
||||
}
|
||||
escapeCharacters(s) {
|
||||
return s.replace(/([<>])/g, '\\$1');
|
||||
}
|
||||
}
|
||||
exports.JestJunitParser = JestJunitParser;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue