Merge branch 'main' of github.com:luisito666/test-reporter into main

This commit is contained in:
luisito666 2022-10-20 08:57:43 -05:00
commit 40d9ace8d8
3 changed files with 6 additions and 3 deletions

View file

@ -1,6 +1,6 @@
![Tests failed](https://img.shields.io/badge/tests-2%20passed%2C%202%20failed%2C%201%20skipped-critical)
## ❌ <a id="user-content-r0" href="#r0">fixtures/external/go/go-junit-report.xml</a>
**5** tests were completed in **NaNms** with **2** passed, **2** failed and **1** skipped.
**5** tests were completed in **1s** with **2** passed, **2** failed and **1** skipped.
|Test suite|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[github.com/company/package1](#r0s0)||||0ms|

View file

@ -123,6 +123,6 @@ TestRunResult {
"totalTime": 835,
},
],
"totalTime": NaN,
"totalTime": undefined,
}
`;

View file

@ -43,7 +43,10 @@ export class GoJunitParser implements TestParser {
return sr
})
const time = parseFloat(junit.testsuites.$.time) * 1000
const time =
junit.testsuites.$?.time === undefined
? undefined
: parseFloat(junit.testsuites.$.time) * 1000
return new TestRunResult(path, suites, time)
}