mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Fix for empty TRX TestDefinitions
This commit is contained in:
parent
d609194929
commit
2acf6c2ccd
2 changed files with 4 additions and 2 deletions
3
dist/index.js
generated
vendored
3
dist/index.js
generated
vendored
|
|
@ -937,7 +937,8 @@ class DotnetTrxParser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getTestClasses(trx) {
|
getTestClasses(trx) {
|
||||||
if (trx.TestRun.TestDefinitions === undefined || trx.TestRun.Results === undefined) {
|
if (trx.TestRun.TestDefinitions === undefined || trx.TestRun.Results === undefined ||
|
||||||
|
!trx.TestRun.TestDefinitions.some(td => td.UnitTest && Array.isArray(td.UnitTest))) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const unitTests = {};
|
const unitTests = {};
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,8 @@ export class DotnetTrxParser implements TestParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
private getTestClasses(trx: TrxReport): TestClass[] {
|
private getTestClasses(trx: TrxReport): TestClass[] {
|
||||||
if (trx.TestRun.TestDefinitions === undefined || trx.TestRun.Results === undefined) {
|
if (trx.TestRun.TestDefinitions === undefined || trx.TestRun.Results === undefined ||
|
||||||
|
!trx.TestRun.TestDefinitions.some(td => td.UnitTest && Array.isArray(td.UnitTest))) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue