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 jasnell committed Mar 8, 2017
1 parent 5b0d378 commit 07610f6
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 07610f6

Please sign in to comment.