cli: Fix so it returns error code on failed tests

This commit is contained in:
Jonatan Nilsson 2021-10-11 01:29:07 +00:00
parent 11135fde83
commit 96de2a5fbc

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)