Debian Codegraph @

js/src/tests/test262/language/statements/for-in/order-enumerable-shadowed.js

raw
1 // Copyright 2019 Kevin Gibbons. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-enumerate-object-properties
6 description: Enumerable properties the prototype which are shadowed by non-enumerable properties on the object are not enumerated
7 features: [for-in-order]
8 includes: [compareArray.js]
9 ---*/
10
11 var proto = {
12 p2: 'p2',
13 };
14
15 var o = Object.create(proto, {
16 'p1': {
17 value: 'p1',
18 enumerable: true,
19 },
20 'p2': {
21 value: 'p1',
22 enumerable: false,
23 },
24 });
25
26
27
28 var keys = [];
29 for (var key in o) {
30 keys.push(key);
31 }
32
33 assert.compareArray(keys, ['p1']);
34
35 reportCompare(0, 0);