michael@0: load(libdir + "asserts.js"); michael@0: michael@0: /* michael@0: * Throw a TypeError if the trap does not report undefined for a non-configurable michael@0: * accessor property that does not have a getter michael@0: */ michael@0: var target = {}; michael@0: Object.defineProperty(target, 'foo', { michael@0: set: function (value) {}, michael@0: configurable: false michael@0: }); michael@0: assertThrowsInstanceOf(function () { michael@0: new Proxy(target, { michael@0: get: function (target, name, receiver) { michael@0: return 'baz'; michael@0: } michael@0: })['foo']; michael@0: }, TypeError);