mirror of https://github.com/lukechilds/node.git
Browse Source
PR-URL: https://github.com/nodejs/node/pull/11024 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>v6.x
committed by
Myles Borins
1 changed files with 17 additions and 0 deletions
@ -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); |
Loading…
Reference in new issue