Skip to content

Commit 3dca09b

Browse files
committed
Fixes runtests-parallel not reporting failure for failed tests.
1 parent 8b09312 commit 3dca09b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scripts/mocha-parallel.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ function runTests(taskConfigsFolder, run, options, cb) {
193193
counter--;
194194

195195
if (counter <= 0) {
196-
var failed = 0;
197196
var reporter = new Base(),
198197
stats = reporter.stats,
199198
failures = reporter.failures;
@@ -224,8 +223,8 @@ function runTests(taskConfigsFolder, run, options, cb) {
224223
reporter.epilogue();
225224
}
226225

227-
if (failed) {
228-
return cb(new Error("Test failures reported: " + failed));
226+
if (stats.failures) {
227+
return cb(new Error("Test failures reported: " + stats.failures));
229228
}
230229
else {
231230
return cb();

0 commit comments

Comments
 (0)