Skip to content

Conversation

ghaiszaher
Copy link
Member

@ghaiszaher ghaiszaher commented Jan 12, 2024

Fixes #184

What

  • Ignore files that don't have testsuites
  • Reorganize the folders

How

  • Return an empty array if testsuites or testsuites.testsuite don't exist

Comment on lines +52 to +63
function getTestsuites(report) {
if (report.testsuite) {
return [report.testsuite];
}
if (!report.testsuites || !report.testsuites.testsuite) {
return [];
}
if (Array.isArray(report.testsuites.testsuite)) {
return report.testsuites.testsuite;
}
return [report.testsuites.testsuite];
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main change

@ghaiszaher ghaiszaher marked this pull request as ready for review January 12, 2024 16:35
@ghaiszaher ghaiszaher requested a review from a team as a code owner January 12, 2024 16:35
Copy link
Contributor

@crypticmind crypticmind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff

@ghaiszaher ghaiszaher merged commit 687f107 into master Jan 15, 2024
@ghaiszaher ghaiszaher deleted the GH-184/fix-xml branch January 15, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maven failsafe plugin reports parsing fails: [Error: Cannot read properties of undefined (reading 'testsuite')]
3 participants