Skip to content

Commit

Permalink
test: add regression test for Proxy as vm context
Browse files Browse the repository at this point in the history
A Proxy context should not hide built-in global objects.
Ref: nodejs#6158

PR-URL: nodejs#6967
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
targos authored and Fishrock123 committed May 30, 2016
1 parent fd4ab6b commit 4f1c108
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/parallel/test-vm-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@ assert.throws(function() {
}, function(err) {
return /expected-filename.js:33:130/.test(err.stack);
}, 'Expected appearance of proper offset in Error stack');

// https://github.com/nodejs/node/issues/6158
ctx = new Proxy({}, {});
assert.strictEqual(typeof vm.runInNewContext('String', ctx), 'function');

0 comments on commit 4f1c108

Please sign in to comment.