mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-04 04:05:22 -08:00
Fix for empty TRX TestDefinitions
This commit is contained in:
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 []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user