name.js (1017B)
1 // Copyright (C) 2016 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-properties-of-the-generatorfunction-constructor 5 description: Function "name" property 6 info: | 7 The value of the name property of the GeneratorFunction is 8 "GeneratorFunction". 9 10 17 ECMAScript Standard Built-in Objects: 11 Every built-in Function object, including constructors, that is not 12 identified as an anonymous function has a name property whose value is a 13 String. 14 15 Unless otherwise specified, the name property of a built-in Function object, 16 if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: 17 false, [[Configurable]]: true }. 18 includes: [propertyHelper.js] 19 features: [generators] 20 ---*/ 21 22 var GeneratorFunction = Object.getPrototypeOf(function*() {}).constructor; 23 24 verifyProperty(GeneratorFunction, "name", { 25 value: "GeneratorFunction", 26 writable: false, 27 enumerable: false, 28 configurable: true 29 }); 30 31 reportCompare(0, 0);