Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Reflect / ownKeys / return-empty-array.js
bloba43aadca9e14a6067fd2d4dafc5b28d7a1c129e6
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 empty array when target has no own properties.
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 assert.compareArray(Reflect.ownKeys({}), []);
20 var o = {
21   d: 42
23 delete o.d;
24 assert.compareArray(Reflect.ownKeys(o), []);
26 reportCompare(0, 0);