Skip to content

Commit 6f3f5af

Browse files
targosrvagg
authored andcommitted
test: add regression test for Proxy as vm context
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>
1 parent 5990a7f commit 6f3f5af

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/parallel/test-vm-context.js

+4
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)