diff --git a/lib/test.js b/lib/test.js index ff22871c..9ce1082c 100644 --- a/lib/test.js +++ b/lib/test.js @@ -136,7 +136,7 @@ Test.prototype.timeoutAfter = function (ms) { if (!ms) throw new Error('timeoutAfter requires a timespan'); var self = this; var timeout = safeSetTimeout(function () { - self.fail('test timed out after ' + ms + 'ms'); + self.fail(self.name + ' timed out after ' + ms + 'ms'); self.end(); }, ms); this.once('end', function () { diff --git a/test/timeoutAfter.js b/test/timeoutAfter.js index 80752d28..5d198e2a 100644 --- a/test/timeoutAfter.js +++ b/test/timeoutAfter.js @@ -12,11 +12,11 @@ tap.test('timeoutAfter test', function (tt) { tt.same(stripFullStack(rows.toString('utf8')), [ 'TAP version 13', '# timeoutAfter', - 'not ok 1 test timed out after 1ms', + 'not ok 1 timeoutAfter timed out after 1ms', ' ---', ' operator: fail', ' stack: |-', - ' Error: test timed out after 1ms', + ' Error: timeoutAfter timed out after 1ms', ' [... stack stripped ...]', ' ...', '',