From 07610f6f5a9f14e9ac9be84daee815bfbf93a184 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 PR-URL: https://github.com/nodejs/node/pull/11024 Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- .../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);