Skip to content

Commit 004389f

Browse files
committed
tweak timeout messaging; see #2294
1 parent 12afaf7 commit 004389f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/runnable.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ Runnable.prototype.resetTimeout = function () {
229229
if (!self._enableTimeouts) {
230230
return;
231231
}
232-
self.callback(new Error('timeout! Test didn\'t complete within ' + ms +
233-
'. For async tests, make sure you are calling \'done\' or that the returned Promise eventually resolves.'));
232+
self.callback(new Error('Timeout of ' + ms +
233+
'ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.'));
234234
self.timedOut = true;
235235
}, ms);
236236
};
@@ -289,8 +289,8 @@ Runnable.prototype.run = function (fn) {
289289
self.duration = new Date() - start;
290290
finished = true;
291291
if (!err && self.duration > ms && self._enableTimeouts) {
292-
err = new Error('timeout! Test didn\'t complete within ' + ms +
293-
'. For async tests, make sure you are calling \'done\' or that the returned Promise eventually resolves.');
292+
err = new Error('Timeout of ' + ms +
293+
'ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.');
294294
}
295295
fn(err);
296296
}

0 commit comments

Comments
 (0)