blob: e2ca63512744a07c4081bdbcff1035323baf5cfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 26.1.11
description: >
Returns empty array when target has now own properties.
info: |
26.1.11 Reflect.ownKeys ( target )
...
2. Let keys be target.[[OwnPropertyKeys]]().
3. ReturnIfAbrupt(keys).
4. Return CreateArrayFromList(keys).
includes: [compareArray.js]
---*/
assert(compareArray(Reflect.ownKeys({}), []));
var o = {d: 42};
delete o.d;
assert(compareArray(Reflect.ownKeys(o), []));
|