From 7d07e8e7862f37f706ee791951a45843a84ae17d Mon Sep 17 00:00:00 2001 From: AnnaMag Date: Thu, 26 Jan 2017 17:29:07 +0000 Subject: [PATCH] test: add known_issues test for #10223 --- .../test-vm-data-property-writable.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/known_issues/test-vm-data-property-writable.js diff --git a/test/known_issues/test-vm-data-property-writable.js b/test/known_issues/test-vm-data-property-writable.js new file mode 100644 index 00000000000000..f29052a73a7b6b --- /dev/null +++ b/test/known_issues/test-vm-data-property-writable.js @@ -0,0 +1,17 @@ +'use strict'; +// Refs: https://github.com/nodejs/node/issues/10223 + +require('../common'); +const vm = require('vm'); +const assert = require('assert'); + +const context = vm.createContext({}); + +const code = ` + Object.defineProperty(this, 'foo', {value: 5}); + Object.getOwnPropertyDescriptor(this, 'foo'); +`; + +const desc = vm.runInContext(code, context); + +assert.strictEqual(desc.writable, false);