diff --git a/lib/test.js b/lib/test.js index 2ea55df8..4d6182c0 100644 --- a/lib/test.js +++ b/lib/test.js @@ -159,7 +159,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 1f188da6..eab18702 100644 --- a/test/timeoutAfter.js +++ b/test/timeoutAfter.js @@ -14,11 +14,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 ...]', ' ...', '',