0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/known_issues/test-vm-inherited_properties.js
Sebastiaan Deckers bb29405904
lib,src: fix consistent spacing inside braces
PR-URL: https://github.com/nodejs/node/pull/14162
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-21 15:13:47 -04:00

21 lines
410 B
JavaScript

'use strict';
// Ref: https://github.com/nodejs/node/issues/5350
require('../common');
const vm = require('vm');
const assert = require('assert');
const base = {
propBase: 1
};
const sandbox = Object.create(base, {
propSandbox: { value: 3 }
});
const context = vm.createContext(sandbox);
const result = vm.runInContext('this.hasOwnProperty("propBase");', context);
assert.strictEqual(result, false);