blob: d2c9c18c9de630054727b34ef8c315e5733aadd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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);
|