Exit should wait for stdout (joyent/node#1669).

This commit is contained in:
Ingvar Stepanyan 2014-07-24 23:22:52 +03:00 committed by Marijn Haverbeke
parent 3779ed41a4
commit 7c34bb34ce

View File

@ -13,8 +13,11 @@ driver.runTests(report);
console.log(testsRun + " tests run in " + (+new Date - t0) + "ms"); console.log(testsRun + " tests run in " + (+new Date - t0) + "ms");
if (failed) { if (failed) {
console.log(failed + " failures."); process.stdout.once('drain', function () {
process.exit(1); process.exit(1);
} });
console.log(failed + " failures.");
} else {
console.log("All passed."); console.log("All passed.");
}