• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3require('../common');
4const assert = require('assert');
5const vm = require('vm');
6
7const code = `Object.defineProperty(this, 99, {
8      value: 20,
9      enumerable: true
10 });`;
11
12
13const sandbox = {};
14const ctx = vm.createContext(sandbox);
15vm.runInContext(code, ctx);
16
17assert.strictEqual(sandbox[99], 20);
18