From 3dca09b200454af40d9cd4da05f9d74b71e442eb Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 13 Jun 2016 12:58:21 -0700 Subject: [PATCH] Fixes runtests-parallel not reporting failure for failed tests. --- scripts/mocha-parallel.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/mocha-parallel.js b/scripts/mocha-parallel.js index cc695729cbd..bf33f68f204 100644 --- a/scripts/mocha-parallel.js +++ b/scripts/mocha-parallel.js @@ -193,7 +193,6 @@ function runTests(taskConfigsFolder, run, options, cb) { counter--; if (counter <= 0) { - var failed = 0; var reporter = new Base(), stats = reporter.stats, failures = reporter.failures; @@ -224,8 +223,8 @@ function runTests(taskConfigsFolder, run, options, cb) { reporter.epilogue(); } - if (failed) { - return cb(new Error("Test failures reported: " + failed)); + if (stats.failures) { + return cb(new Error("Test failures reported: " + stats.failures)); } else { return cb();