☕️ Classic, reliable, trusted test framework for Node.js and the browser
add Mocha() options bail support
TJ Holowaychukf0b441ceef49
diff --git a/lib/mocha.js b/lib/mocha.jsindex 7a21e332..d4f84be7 100644--- a/lib/mocha.js+++ b/lib/mocha.js@@ -52,6 +52,7 @@ function image(name) {* - `reporter` reporter instance, defaults to `mocha.reporters.Dot`* - `globals` array of accepted globals* - `timeout` timeout in milliseconds+ * - `bail` bail on the first test failure* - `slow` milliseconds to wait before considering a test slow* - `ignoreLeaks` ignore global leaks* - `grep` string or regexp to filter tests with@@ -67,6 +68,7 @@ function Mocha(options) {this.grep(options.grep);this.suite = new exports.Suite('', new exports.Context);this.ui(options.ui);+ this.bail(options.bail);this.reporter(options.reporter);if (options.timeout) this.timeout(options.timeout);if (options.slow) this.slow(options.slow);