mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 14:27:10 +01:00
Merge branch 'main' into mocha-json
This commit is contained in:
commit
3768e4e756
30 changed files with 14928 additions and 558 deletions
|
|
@ -33,12 +33,15 @@ export class JestJunitParser implements TestParser {
|
|||
}
|
||||
|
||||
private getTestRunResult(path: string, junit: JunitReport): TestRunResult {
|
||||
const suites = junit.testsuites.testsuite.map(ts => {
|
||||
const name = ts.$.name.trim()
|
||||
const time = parseFloat(ts.$.time) * 1000
|
||||
const sr = new TestSuiteResult(name, this.getGroups(ts), time)
|
||||
return sr
|
||||
})
|
||||
const suites =
|
||||
junit.testsuites.testsuite === undefined
|
||||
? []
|
||||
: junit.testsuites.testsuite.map(ts => {
|
||||
const name = ts.$.name.trim()
|
||||
const time = parseFloat(ts.$.time) * 1000
|
||||
const sr = new TestSuiteResult(name, this.getGroups(ts), time)
|
||||
return sr
|
||||
})
|
||||
|
||||
const time = parseFloat(junit.testsuites.$.time) * 1000
|
||||
return new TestRunResult(path, suites, time)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue