blob: 00d97cbbca9a19bf986c8561a8d72d5c518d6c0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
load(libdir + "asserts.js");
// Throw a TypeError if the trap skips a non-configurable enumerable property
var target = {};
Object.defineProperty(target, 'foo', {
enumerable: true,
configurable: false
});
var handler = { ownKeys: () => [] };
for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy])
assertThrowsInstanceOf(() => Object.keys(p), TypeError);
|