Skip to content

Commit

Permalink
Handle stack variation in Node v0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
fongandrew committed Sep 11, 2017
1 parent 6015599 commit a5fb7ed
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/anonymous-fn.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ tap.test('inside anonymous functions', function (tt) {

var test = tape.createHarness();
var tc = function (rows) {
tt.same(stripFullStack(rows.toString('utf8')), [
var body = stripFullStack(rows.toString('utf8'));

// Handle stack trace variation in Node v0.8
body = body.replace(
'at Test.module.exports',
'at Test.<anonymous>'
);

tt.same(body, [
'TAP version 13',
'# wrapped test failure',
'not ok 1 fail',
Expand Down

0 comments on commit a5fb7ed

Please sign in to comment.