cli: Fix so it returns error code on failed tests

master
Jonatan Nilsson 2021-10-11 01:29:07 +00:00
parent 11135fde83
commit 96de2a5fbc
1 changed files with 4 additions and 1 deletions

View File

@ -60,7 +60,10 @@ cli.processTargets().then(function() {
printError(err)
process.exit(1)
})
.then(function() {
.then(function(stats) {
if (stats.failed > 0) {
process.exit(10)
}
process.exit(0)
}, function(err) {
console.error('\x1b[31mInternal error occured:\x1b[0m', err)