From c8893383a2e85d793a963aff8fd673ecbe597a12 Mon Sep 17 00:00:00 2001 From: AnnaMag Date: Sat, 17 Dec 2016 17:05:02 +0100 Subject: [PATCH] test: add known_issues test for #5350 PR-URL: https://github.com/nodejs/node/pull/10319 Reviewed-By: Colin Ihrig Reviewed-By: Jeremiah Senkpiel Reviewed-By: Franziska Hinkelmann --- .../test-vm-inherited_properties.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/known_issues/test-vm-inherited_properties.js diff --git a/test/known_issues/test-vm-inherited_properties.js b/test/known_issues/test-vm-inherited_properties.js new file mode 100644 index 00000000000000..f90cf3568ed9c5 --- /dev/null +++ b/test/known_issues/test-vm-inherited_properties.js @@ -0,0 +1,20 @@ +'use strict'; +// Ref: https://github.com/nodejs/node/issues/5350 + +require('../common'); +const vm = require('vm'); +const assert = require('assert'); + +const base = { + propBase: 1 +}; + +const sandbox = Object.create(base, { + propSandbox: {value: 3} +}); + +const context = vm.createContext(sandbox); + +const result = vm.runInContext('this.hasOwnProperty("propBase");', context); + +assert.strictEqual(result, false);