summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/object/defineProperties-order.js
blob: 417d1018331c1dcdc64bcc2f30d78c8d1b7791af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Based on testcases provided by André Bargull

let log = [];
let logger = new Proxy({}, {
    get(target, key) {
        log.push(key);
    }
});

Object.create(null, new Proxy({a: {value: 0}, b: {value: 1}}, logger));
assertEq(log.join(), "ownKeys,getOwnPropertyDescriptor,get,getOwnPropertyDescriptor,get");

log = [];
Object.defineProperties({}, new Proxy({a: {value: 0}, b: {value: 1}}, logger));
assertEq(log.join(), "ownKeys,getOwnPropertyDescriptor,get,getOwnPropertyDescriptor,get");

reportCompare(true, true);