aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-vm-context.js
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2016-05-25 10:42:30 +0200
committerMichaël Zasso <targos@protonmail.com>2016-05-26 09:48:23 +0200
commitf9ea52e5ebebf4ad7058ff1d950c63ae18a7a3da (patch)
tree2f93da2f95744db9ecca119074a35b4f56bce841 /test/parallel/test-vm-context.js
parent048b3de22d843a8dd3d00b00b702205ca90dbf58 (diff)
downloadandroid-node-v8-f9ea52e5ebebf4ad7058ff1d950c63ae18a7a3da.tar.gz
android-node-v8-f9ea52e5ebebf4ad7058ff1d950c63ae18a7a3da.tar.bz2
android-node-v8-f9ea52e5ebebf4ad7058ff1d950c63ae18a7a3da.zip
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>
Diffstat (limited to 'test/parallel/test-vm-context.js')
-rw-r--r--test/parallel/test-vm-context.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/parallel/test-vm-context.js b/test/parallel/test-vm-context.js
index 48bceb1459..ce648b7fb7 100644
--- a/test/parallel/test-vm-context.js
+++ b/test/parallel/test-vm-context.js
@@ -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');