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: #6158

PR-URL: #6967
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
targos committed May 26, 2016
1 parent 048b3de commit f9ea52e
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 f9ea52e

Please sign in to comment.