Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Bail

Guillermo Rauch59e694c77c08
diff --git a/lib/runner.js b/lib/runner.js
index 6f2a705b..6132757d 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -289,6 +289,9 @@ Runner.prototype.runTests = function(suite, fn){
, test;
function next(err) {
+ // if we bail after first err
+ if (self.failures && suite._bail) return fn();
+
// next test
test = tests.shift();