Skip to content

Commit

Permalink
Exit when failure after calculating time
Browse files Browse the repository at this point in the history
  • Loading branch information
ignasi42 committed Jan 24, 2023
1 parent d30fe78 commit 8158264
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ async function start() {
process.exit(1);
}

if (totalFailures > 0) {
process.stderr.write(`\x1b[31m${totalFailures} test failure(s)\n`);
process.exit(1);
}

const timeSaved = totalDuration - timeTaken;
console.log(
`Total run time: ${totalDuration / 1000}s, executed in: ${
Expand All @@ -126,6 +121,11 @@ async function start() {
)}%)`
);

if (totalFailures > 0) {
process.stderr.write(`\x1b[31m${totalFailures} test failure(s)\n`);
process.exit(1);
}

generateWeightsFile(specWeights, totalDuration, totalWeight);
process.exit(totalFailures);
}
Expand Down

0 comments on commit 8158264

Please sign in to comment.