mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Fix parsing of ESLint reports in jest-junit format
The [ESLint junit formatter](https://www.npmjs.com/package/eslint-junit) does not include a total time attribute for the root `<testsuites>` element.
This commit is contained in:
parent
9557e57e83
commit
45526f79fd
6 changed files with 65 additions and 2 deletions
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
|
|
@ -1320,7 +1320,7 @@ class JestJunitParser {
|
|||
const sr = new test_results_1.TestSuiteResult(name, this.getGroups(ts), time);
|
||||
return sr;
|
||||
});
|
||||
const time = parseFloat(junit.testsuites.$.time) * 1000;
|
||||
const time = junit.testsuites.$ && parseFloat(junit.testsuites.$.time) * 1000;
|
||||
return new test_results_1.TestRunResult(path, suites, time);
|
||||
}
|
||||
getGroups(suite) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue