Skip to content

Commit

Permalink
test: add known_issues test for #10223
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaMag committed Jan 26, 2017
1 parent 3b2a630 commit 7d07e8e
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 7d07e8e

Please sign in to comment.