Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Reflect / ownKeys / return-array-with-own-keys-only.js
blob1d23fd7b32162142e70439762f8f04992eacb713
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 26.1.11
5 description: >
6   Returns target's own property keys only, ignore prototype keys.
7 info: |
8   26.1.11 Reflect.ownKeys ( target )
10   ...
11   2. Let keys be target.[[OwnPropertyKeys]]().
12   3. ReturnIfAbrupt(keys).
13   4. Return CreateArrayFromList(keys).
14 includes: [compareArray.js]
15 features: [Reflect]
16 ---*/
18 var proto = {
19   foo: 1
22 var o = Object.create(proto);
23 o.p1 = 42;
24 o.p2 = 43;
25 o.p3 = 44;
26 assert.compareArray(Reflect.ownKeys(o), ['p1', 'p2', 'p3'], 'return object own keys');
28 reportCompare(0, 0);