summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Iterator/prototype/Symbol.toStringTag/prop-desc.js
blob: 5aaffdb1cad6f9ad30524d0de2938c9b4efac858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// |reftest| shell-option(--enable-iterator-helpers) skip-if(!this.hasOwnProperty('Iterator')||!xulRuntime.shell) -- iterator-helpers is not enabled unconditionally, requires shell-options
// Copyright (C) 2023 Michael Ficarra. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-iteratorprototype-@@tostringtag
description: Property descriptor
info: |
  `Iterator.prototype[@@toStringTag]` is an accessor property with attributes { [[Enumerable]]: *false*, [[Configurable]]: *true* }
features: [iterator-helpers]
---*/
let desc = Object.getOwnPropertyDescriptor(Iterator.prototype, Symbol.toStringTag);
assert.sameValue(typeof desc.get, 'function');
assert.sameValue(typeof desc.set, 'function');
assert.sameValue(desc.configurable, true);
assert.sameValue(desc.enumerable, false);
assert.sameValue(desc.value, undefined);
assert.sameValue(desc.writable, undefined);

reportCompare(0, 0);