Skip to content

Commit

Permalink
Handle different junit XML formats (#23617)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover committed Sep 28, 2018
1 parent c44075f commit 76c0a0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dev/failed_tests/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ const mapXml = es.map((file, cb) => {
* Filters all testsuites to find failed testcases
*/
const filterFailures = es.map((testSuite, cb) => {
const testFiles = testSuite.testsuites.testsuite;
// Grab the failures. Reporters may report multiple testsuites in a single file.
const testFiles = testSuite.testsuites
? testSuite.testsuites.testsuite
: [testSuite.testsuite];

const failures = testFiles.reduce((failures, testFile) => {
for (const testCase of testFile.testcase) {
Expand Down

0 comments on commit 76c0a0a

Please sign in to comment.