blob: 16ce41a02965fd22f43a088944567ded44565653 (
plain)
1
2
3
4
5
6
7
|
load(libdir + "asserts.js");
// Throw TypeError if trap returns a property key multiple times.
var handler = { ownKeys: () => [ 'foo', 'foo' ] };
for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy])
assertThrowsInstanceOf(() => Object.keys(p), TypeError);
|