blob: 30e8d6316176f4c6614610e0c220733c10f0a577 [file] [log] [blame]
load(libdir + "asserts.js");
/*
* Throw a TypeError if the trap defines a non-configurable property that does
* not exist on the target
*/
var handler = { defineProperty: function (target, name, desc) { return true; } };
for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy]) {
assertThrowsInstanceOf(function () {
Object.defineProperty(p, 'foo', { configurable: false });
}, TypeError);
}