Skip to content

Commit

Permalink
Fix for empty TRX TestDefinitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Oles Galatsan committed May 15, 2025
1 parent d609194 commit 2acf6c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/parsers/dotnet-trx/dotnet-trx-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export class DotnetTrxParser implements TestParser {
}

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 []
}

Expand Down

0 comments on commit 2acf6c2

Please sign in to comment.