summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/proxy/testDirectProxyHas5.js
blob: c581ede8ed9db16ec964c25edba72b3369c40dec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Return the trap result
var proto = Object.create(null, {
    'foo': {
        configurable: true
    }
});
var target = Object.create(proto, {
    'bar': {
        configurable: true
    }
});

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

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