Skip to content

armgit / mocha

Public Imported from GitHub
0

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

allowing timeout=0 to be set via mocha constructor

badunk9f7f3e5d6f3a
diff --git a/lib/mocha.js b/lib/mocha.js
index a3877e10..184b8866 100644
--- a/lib/mocha.js
+++ b/lib/mocha.js
@@ -70,7 +70,7 @@ function Mocha(options) {
this.ui(options.ui);
this.bail(options.bail);
this.reporter(options.reporter);
- if (options.timeout) this.timeout(options.timeout);
+ if (typeof options.timeout === 'number') this.timeout(options.timeout);
if (options.slow) this.slow(options.slow);
}