summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/proxy/testDirectProxyKeys3.js
blob: 1ffc2edd6385ebd0ccb2e1abcb9327606c2d7fb4 (plain)
1
2
3
4
5
6
7
load(libdir + "asserts.js");

// Throw a TypeError if the trap does not return an object

var handler = { ownKeys: () => undefined };
for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy])
    assertThrowsInstanceOf(() => Object.keys(p), TypeError);