summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/generators/length-property-descriptor.js
blob: 65fd5e811e62a8513cfd0dee7d3e15744b9d873c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (C) 2013 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
description: >
    Generator functions should define a `length` property.
includes: [propertyHelper.js]
es6id: 25.2.4
features: [generators]
---*/

function* g() {}

assert.sameValue(g.length, 0);
verifyNotEnumerable(g, 'length');
verifyNotWritable(g, 'length');
verifyConfigurable(g, 'length');

reportCompare(0, 0);