Skip to content

armgit / mocha

Public Imported from GitHub
0

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

fix -t 0 behavior; closes #1446

Christopher Hillerdd0a811b161f
diff --git a/lib/suite.js b/lib/suite.js
index 011817b2..451f84c9 100644
--- a/lib/suite.js
+++ b/lib/suite.js
@@ -98,7 +98,7 @@ Suite.prototype.clone = function(){
Suite.prototype.timeout = function(ms){
if (0 == arguments.length) return this._timeout;
- if (ms === 0) this._enableTimeouts = false;
+ if (ms.toString() === '0') this._enableTimeouts = false;
if ('string' == typeof ms) ms = milliseconds(ms);
debug('timeout %d', ms);
this._timeout = parseInt(ms, 10);