Skip to content

Commit

Permalink
test: add known_issues test for #10223
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
AnnaMag authored and MylesBorins committed Mar 9, 2017
1 parent fc2bb2c commit 1df09f9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/known_issues/test-vm-data-property-writable.js
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 1df09f9

Please sign in to comment.