| 1 |
// Copyright (C) 2013 the V8 project authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
/*--- |
| 4 |
es6id: 19.1.2.8 |
| 5 |
description: > |
| 6 |
Object.getOwnPropertySymbols returns all symbol properties that have descriptions |
| 7 |
features: [Symbol] |
| 8 |
---*/ |
| 9 |
|
| 10 |
var sym = Symbol("description"); |
| 11 |
|
| 12 |
var obj = {}; |
| 13 |
obj[sym] = 1; |
| 14 |
|
| 15 |
var syms = Object.getOwnPropertySymbols(obj); |
| 16 |
|
| 17 |
assert.sameValue(syms[0], sym, "Array of symbols returned by `Object.getOwnPropertySymbols(obj)` includes `sym`"); |
| 18 |
assert.sameValue(syms.length, 1, "The value of `syms.length` is `1`"); |