Debian Codegraph @

js/src/tests/test262/language/expressions/object/method-definition/generator-length.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 description: >
6 Generator functions declared as methods have a `length` property that
7 describes the number of formal parameters.
8 es6id: 14.4.13
9 includes: [propertyHelper.js]
10 features: [generators]
11 ---*/
12
13 var method = { *method(a, b, c) {} }.method;
14
15 verifyProperty(method, "length", {
16 value: 3,
17 writable: false,
18 enumerable: false,
19 configurable: true,
20 });
21
22 reportCompare(0, 0);