mirror of
https://github.com/tc39/test262.git
synced 2025-05-19 06:10:28 +02:00
* Defer making [[ProxyTarget]] non-extensible * Fix typo in method name * Add last Object.keys with Proxy invariant test * Add Object.getOwnPropertySymbols with Proxy invariants tests * Add Object.getOwnPropertyNames with Proxy invariants tests * Replace "es6id" with "esid" in Object.getOwnPropertySymbols tests
19 lines
606 B
JavaScript
19 lines
606 B
JavaScript
// Copyright (C) 2013 the V8 project authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
esid: sec-object.getownpropertysymbols
|
|
description: >
|
|
Object.getOwnPropertySymbols returns all symbol properties that have descriptions
|
|
features: [Symbol]
|
|
---*/
|
|
|
|
var sym = Symbol("description");
|
|
|
|
var obj = {};
|
|
obj[sym] = 1;
|
|
|
|
var syms = Object.getOwnPropertySymbols(obj);
|
|
|
|
assert.sameValue(syms[0], sym, "Array of symbols returned by `Object.getOwnPropertySymbols(obj)` includes `sym`");
|
|
assert.sameValue(syms.length, 1, "The value of `syms.length` is `1`");
|