Comparing version
@@ -56,3 +56,2 @@ 'use strict'; | ||
this.timedOut = false; | ||
this._trace = new Error('done() called multiple times'); | ||
this._retries = -1; | ||
@@ -282,3 +281,9 @@ this._currentRetry = 0; | ||
emitted = true; | ||
self.emit('error', err || new Error('done() called multiple times; stacktrace may be inaccurate')); | ||
var msg = 'done() called multiple times'; | ||
if (err && err.message) { | ||
err.message += " (and Mocha's " + msg + ')'; | ||
self.emit('error', err); | ||
} else { | ||
self.emit('error', new Error(msg)); | ||
} | ||
} | ||
@@ -292,4 +297,5 @@ | ||
} | ||
if (finished) { | ||
return multiple(err || self._trace); | ||
return multiple(err); | ||
} | ||
@@ -296,0 +302,0 @@ |
@@ -813,7 +813,2 @@ 'use strict'; | ||
// If there is an `only` filter | ||
if (hasOnly(rootSuite)) { | ||
filterOnly(rootSuite); | ||
} | ||
fn = fn || function () {}; | ||
@@ -826,2 +821,6 @@ | ||
function start () { | ||
// If there is an `only` filter | ||
if (hasOnly(rootSuite)) { | ||
filterOnly(rootSuite); | ||
} | ||
self.started = true; | ||
@@ -828,0 +827,0 @@ self.emit('start'); |
{ | ||
"name": "mocha", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "simple, flexible, fun test framework", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
849711
0.16%19154
0.05%1
Infinity%