☕️ Classic, reliable, trusted test framework for Node.js and the browser
set with ._timeout to prevent debug output
Tj Holowaychuk0b09f3703470
diff --git a/lib/runnable.js b/lib/runnable.jsindex e0ef7a6f..a3610332 100644--- a/lib/runnable.js+++ b/lib/runnable.js@@ -25,7 +25,7 @@ function Runnable(title, fn) {this.fn = fn;this.async = fn && fn.length;this.sync = ! this.async;- this.timeout(2000);+ this._timeout = 2000;}/**diff --git a/lib/suite.js b/lib/suite.jsindex d3fa9833..59825d32 100644--- a/lib/suite.js+++ b/lib/suite.js@@ -67,7 +67,7 @@ function Suite(title) {this._afterEach = [];this._afterAll = [];this.root = !title;- this.timeout(2000);+ this._timeout = 2000;}/**@@ -179,7 +179,7 @@ Suite.prototype.afterEach = function(fn){Suite.prototype.addSuite = function(suite){suite.parent = this;- if (this._timeout) suite.timeout(this._timeout);+ suite.timeout(this.timeout());this.suites.push(suite);this.emit('suite', suite);return this;@@ -195,7 +195,7 @@ Suite.prototype.addSuite = function(suite){Suite.prototype.addTest = function(test){test.parent = this;- if (this._timeout) test.timeout(this._timeout);+ test.timeout(this.timeout());this.tests.push(test);this.emit('test', test);return this;