Skip to content

Commit

Permalink
Fix eval trace matches under Node 7
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdecker committed Dec 28, 2016
1 parent 9f16aa7 commit 731b1fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ it('eval', function() {
'Error: test',

// Before Node 4, `Object.eval`, after just `eval`.
/^ at (?:Object\.)?eval \(eval at <anonymous> \((?:.*\/)?line1\.js:1001:101\)/,
/^ at (?:Object\.)?eval \(eval at (<anonymous>|exports.test) \((?:.*\/)?line1\.js:1001:101\)/,

/^ at Object\.exports\.test \((?:.*\/)?line1\.js:1001:101\)$/
]);
Expand All @@ -191,8 +191,8 @@ it('eval inside eval', function() {
'eval("eval(\'throw new Error(\\"test\\")\')");'
], [
'Error: test',
/^ at (?:Object\.)?eval \(eval at <anonymous> \(eval at <anonymous> \((?:.*\/)?line1\.js:1001:101\)/,
/^ at (?:Object\.)?eval \(eval at <anonymous> \((?:.*\/)?line1\.js:1001:101\)/,
/^ at (?:Object\.)?eval \(eval at (<anonymous>|exports.test) \(eval at (<anonymous>|exports.test) \((?:.*\/)?line1\.js:1001:101\)/,
/^ at (?:Object\.)?eval \(eval at (<anonymous>|exports.test) \((?:.*\/)?line1\.js:1001:101\)/,
/^ at Object\.exports\.test \((?:.*\/)?line1\.js:1001:101\)$/
]);
});
Expand Down Expand Up @@ -227,7 +227,7 @@ it('eval with sourceURL inside eval', function() {
], [
'Error: test',
/^ at (?:Object\.)?eval \(sourceURL\.js:1:7\)$/,
/^ at (?:Object\.)?eval \(eval at <anonymous> \((?:.*\/)?line1\.js:1001:101\)/,
/^ at (?:Object\.)?eval \(eval at (<anonymous>|exports.test) \((?:.*\/)?line1\.js:1001:101\)/,
/^ at Object\.exports\.test \((?:.*\/)?line1\.js:1001:101\)$/
]);
});
Expand Down

0 comments on commit 731b1fc

Please sign in to comment.