Check if tests are finished at the end (#407)

The result of the very last test is currently ignored. In particular, if
a single test is ever run, the output always shows 0/0 success.
This commit is contained in:
Sahand Saba 2017-04-14 17:06:07 -07:00 committed by GitHub
parent 674052c7ee
commit 22059659d8

View File

@ -426,11 +426,6 @@ function masterRunSingleProcess(
let numLeft = tests.length;
for (let t of tests) {
handleTest(t, harnesses, args.timeout, (err, results) => {
numLeft--;
if (numLeft === 0) {
// all done
process.exit(handleFinished(args, groups, numFiltered));
}
if (err) {
if (args.verbose) {
console.log(err);
@ -447,6 +442,11 @@ function masterRunSingleProcess(
console.log(progress);
}
}
numLeft--;
if (numLeft === 0) {
// all done
process.exit(handleFinished(args, groups, numFiltered));
}
});
}
}