summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames3.js
blob: cd674a8ba99b6f3da1ab26bc2f666b26f762a00f (plain)
1
2
3
4
5
6
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.getOwnPropertyNames(p), TypeError);