Skip to content

Commit 4f1c108

Browse files
targosFishrock123
authored andcommitted
test: add regression test for Proxy as vm context
A Proxy context should not hide built-in global objects. Ref: nodejs#6158 PR-URL: nodejs#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>
1 parent fd4ab6b commit 4f1c108

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/parallel/test-vm-context.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,7 @@ assert.throws(function() {
7272
}, function(err) {
7373
return /expected-filename.js:33:130/.test(err.stack);
7474
}, 'Expected appearance of proper offset in Error stack');
75+
76+
// https://github.com/nodejs/node/issues/6158
77+
ctx = new Proxy({}, {});
78+
assert.strictEqual(typeof vm.runInNewContext('String', ctx), 'function');

0 commit comments

Comments
 (0)