mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Fixes #82 - net-trx parser handles missing duration attribute
This commit is contained in:
parent
faaff05398
commit
d29a37e78a
4 changed files with 7 additions and 4 deletions
3
dist/index.js
generated
vendored
3
dist/index.js
generated
vendored
|
|
@ -697,7 +697,8 @@ class DotnetTrxParser {
|
|||
}
|
||||
const output = r.unitTestResult.Output;
|
||||
const error = (output === null || output === void 0 ? void 0 : output.length) > 0 && ((_a = output[0].ErrorInfo) === null || _a === void 0 ? void 0 : _a.length) > 0 ? output[0].ErrorInfo[0] : undefined;
|
||||
const duration = parse_utils_1.parseNetDuration(r.unitTestResult.$.duration);
|
||||
const durationAttr = r.unitTestResult.$.duration;
|
||||
const duration = durationAttr ? parse_utils_1.parseNetDuration(durationAttr) : 0;
|
||||
const test = new Test(r.testMethod.$.name, r.unitTestResult.$.outcome, duration, error);
|
||||
tc.tests.push(test);
|
||||
}
|
||||
|
|
|
|||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue