Debian Codegraph @

js/src/jit-test/tests/proxy/testDirectProxyGetOwnPropertyNames3.js

raw
1 load(libdir + "asserts.js");
2
3 // Throw a TypeError if the trap does not return an object
4 var handler = { ownKeys: () => undefined };
5 for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy])
6 assertThrowsInstanceOf(() => Object.getOwnPropertyNames(p), TypeError);