blob: d2c9c18c9de630054727b34ef8c315e5733aadd3 [file] [log] [blame]
load(libdir + "asserts.js");
/*
* Throw a TypeError if the current descriptor is non-configurable and the trap
* returns a configurable descriptor
*/
var target = {};
Object.defineProperty(target, 'foo', {
configurable: false
});
assertThrowsInstanceOf(function () {
Object.getOwnPropertyDescriptor(Proxy(target, {
getOwnPropertyDescriptor: function (target, name) {
return {
configurable: true
};
}
}), 'foo');
}, TypeError);