Skip to content

armgit / mocha

Public Imported from GitHub
0

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

refactoring internals

Tj Holowaychuk5a218f5f070f
diff --git a/lib/runnable.js b/lib/runnable.js
index 293fea59..feaf965d 100644
--- a/lib/runnable.js
+++ b/lib/runnable.js
@@ -68,7 +68,7 @@ Runnable.prototype.fullTitle = function(){
Runnable.prototype.run = function(fn){
var self = this
- , ms = this._timeout
+ , ms = this.timeout()
, start = new Date
, finished
, emitted
@@ -77,7 +77,7 @@ Runnable.prototype.run = function(fn){
// timeout
if (this.async) {
timer = setTimeout(function(){
- fn(new Error('timeout of ' + ms + 'ms exceeded'));
+ done(new Error('timeout of ' + ms + 'ms exceeded'));
}, ms);
}