Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-vm-indexed-properties.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/parallel/test-vm-indexed-properties.js b/test/parallel/test-vm-indexed-properties.js
new file mode 100644
index 00000000000..34ef8d020b2
--- /dev/null
+++ b/test/parallel/test-vm-indexed-properties.js
@@ -0,0 +1,17 @@
+'use strict';
+
+require('../common');
+const assert = require('assert');
+const vm = require('vm');
+
+const code = `Object.defineProperty(this, 99, {
+ value: 20,
+ enumerable: true
+ });`;
+
+
+const sandbox = {};
+const ctx = vm.createContext(sandbox);
+vm.runInContext(code, ctx);
+
+assert.strictEqual(sandbox[99], 20);