mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 02:45:22 -08: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:
committed by
Jozef Izso
parent
9557e57e83
commit
45526f79fd
@@ -43,7 +43,7 @@ export class JestJunitParser implements TestParser {
|
||||
return sr
|
||||
})
|
||||
|
||||
const time = parseFloat(junit.testsuites.$.time) * 1000
|
||||
const time = junit.testsuites.$ && parseFloat(junit.testsuites.$.time) * 1000
|
||||
return new TestRunResult(path, suites, time)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user