Skip to content

Commit

Permalink
test: Updated custom test reporter to only log failed tests when ther…
Browse files Browse the repository at this point in the history
…e are failures (#2425)
  • Loading branch information
bizob2828 authored Aug 1, 2024
1 parent 599072b commit baa37ec
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/lib/test-reporter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ async function* reporter(source) {
}
}

yield `\n\nFailed tests:\n`
for (const file of failed) {
yield `${file}\n`
if (failed.size > 0) {
yield `\n\nFailed tests:\n`
for (const file of failed) {
yield `${file}\n`
}
}
yield `\n\nPassed: ${passed.size}\nFailed: ${failed.size}\nTotal: ${passed.size + failed.size}\n`
}
Expand Down

0 comments on commit baa37ec

Please sign in to comment.