1'use strict'; 2const common = require('../common'); 3const assert = require('assert'); 4const vm = require('vm'); 5 6// Regression test for https://github.com/nodejs/node/issues/34606 7 8const handler = { 9 getOwnPropertyDescriptor: common.mustCallAtLeast(() => { 10 return {}; 11 }) 12}; 13 14const proxy = new Proxy({}, handler); 15assert.throws(() => vm.runInNewContext('p = 6', proxy), 16 /getOwnPropertyDescriptor/); 17