Skip to content

Commit

Permalink
tweak timeout messaging; see #2294
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Nov 24, 2016
1 parent 12afaf7 commit 004389f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/runnable.js
Expand Up @@ -229,8 +229,8 @@ Runnable.prototype.resetTimeout = function () {
if (!self._enableTimeouts) {
return;
}
self.callback(new Error('timeout! Test didn\'t complete within ' + ms +
'. For async tests, make sure you are calling \'done\' or that the returned Promise eventually resolves.'));
self.callback(new Error('Timeout of ' + ms +
'ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.'));
self.timedOut = true;
}, ms);
};
Expand Down Expand Up @@ -289,8 +289,8 @@ Runnable.prototype.run = function (fn) {
self.duration = new Date() - start;
finished = true;
if (!err && self.duration > ms && self._enableTimeouts) {
err = new Error('timeout! Test didn\'t complete within ' + ms +
'. For async tests, make sure you are calling \'done\' or that the returned Promise eventually resolves.');
err = new Error('Timeout of ' + ms +
'ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.');
}
fn(err);
}
Expand Down

0 comments on commit 004389f

Please sign in to comment.