mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: add known_issues test for #10223
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>
This commit is contained in:
committed by
Franziska Hinkelmann
parent
87b4486da2
commit
e8bb9e68c0
17
test/known_issues/test-vm-data-property-writable.js
Normal file
17
test/known_issues/test-vm-data-property-writable.js
Normal file
@@ -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);
|
||||
Reference in New Issue
Block a user