From a5fb7eda4cde3880bd07b23efb177bae11124768 Mon Sep 17 00:00:00 2001 From: Andrew Fong Date: Sun, 10 Sep 2017 16:50:12 -0700 Subject: [PATCH] Handle stack variation in Node v0.8 --- test/anonymous-fn.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/anonymous-fn.js b/test/anonymous-fn.js index 38712d46..2856ea82 100644 --- a/test/anonymous-fn.js +++ b/test/anonymous-fn.js @@ -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.' + ); + + tt.same(body, [ 'TAP version 13', '# wrapped test failure', 'not ok 1 fail',