Adjust error handling for test task.

This commit is contained in:
Blade Barringer
2015-11-16 12:23:09 -06:00
parent 7a865b5c2a
commit 8f9224c2ae

View File

@@ -362,9 +362,12 @@ gulp.task('test', ['test:all'], () => {
`\x1b[36mPending: ${totals[2]}\t`
);
if (totals[1] > 0) throw "ERROR: There are failing tests!"
else {
kill(server);
kill(server);
if (totals[1] > 0) {
console.error('ERROR: There are failing tests!');
process.exit(1);
} else {
console.log('\n\x1b[36mThanks for helping keep Habitica clean!\x1b[0m');
process.exit();
}