Skip to content

Commit f9ea52e

Browse files
committed
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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 048b3de commit f9ea52e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)