summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/proxy/testDirectProxyHas6.js
blob: 179e40f86fe87f1c38fad7b08ac78978fc56a968 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
 * Don't throw a type error if the trap reports an undefined property as
 * non-present, regardless of extensibility.
 */
var target = {};
Object.preventExtensions(target);

var handler = { has: () => false };

for (let p of [new Proxy(target, handler), Proxy.revocable(target, handler).proxy]) {
    assertEq('foo' in p, false);
    assertEq(Symbol.iterator in p, false);
}