test: add regression test for Proxy as vm context
A Proxy context should not hide built-in global objects. Ref: https://github.com/nodejs/node/issues/6158 PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
048b3de22d
commit
f9ea52e5eb
@ -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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user