From c604016cb408a6fcb8d021c873504de9c8148ba3 Mon Sep 17 00:00:00 2001 From: AnnaMag Date: Wed, 14 Dec 2016 16:55:40 +0100 Subject: [PATCH] test: add known_issues test for #6287 Deleting property in the vm context has no effect as reported in https://github.com/nodejs/node/issues/6287 The test is moved to the known_issues and will be fixed with the 5.5 V8 API changes. PR-URL: https://github.com/nodejs/node/pull/10272 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Colin Ihrig --- test/known_issues/test-vm-deleting-property.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/known_issues/test-vm-deleting-property.js diff --git a/test/known_issues/test-vm-deleting-property.js b/test/known_issues/test-vm-deleting-property.js new file mode 100644 index 0000000000..cda3371a33 --- /dev/null +++ b/test/known_issues/test-vm-deleting-property.js @@ -0,0 +1,15 @@ +'use strict'; +// Refs: https://github.com/nodejs/node/issues/6287 + +require('../common'); +const assert = require('assert'); +const vm = require('vm'); + +const context = vm.createContext(); +const res = vm.runInContext(` + this.x = 'prop'; + delete this.x; + Object.getOwnPropertyDescriptor(this, 'x'); +`, context); + +assert.strictEqual(res.value, undefined);