Skip to content

Commit

Permalink
Updated: Exit on complete if erroring
Browse files Browse the repository at this point in the history
  • Loading branch information
dhershman1 committed Aug 24, 2021
1 parent 148a7b0 commit 9bf253b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ function tapOn (args) {
})

tap.on('complete', results => {
if ((results.count === 0 && results.skip === 0) || results.bailout) {
process.exit(1)
}

if (args.summarize) {
const failCount = results.failures.length
const [past, plural] = failCount === 1 ? ['was', 'failure'] : ['were', 'failures']
Expand Down

0 comments on commit 9bf253b

Please sign in to comment.