summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/GeneratorFunction/prototype/constructor.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/GeneratorFunction/prototype/constructor.js')
-rw-r--r--js/src/tests/test262/built-ins/GeneratorFunction/prototype/constructor.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/GeneratorFunction/prototype/constructor.js b/js/src/tests/test262/built-ins/GeneratorFunction/prototype/constructor.js
new file mode 100644
index 0000000000..2166e3dce1
--- /dev/null
+++ b/js/src/tests/test262/built-ins/GeneratorFunction/prototype/constructor.js
@@ -0,0 +1,25 @@
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-generatorfunction.prototype.constructor
+description: >
+ `constructor` property of the GeneratorFunction.prototype object
+info: |
+ The initial value of GeneratorFunction.prototype.constructor is the intrinsic
+ object %GeneratorFunction%.
+
+ This property has the attributes { [[Writable]]: false, [[Enumerable]]:
+ false, [[Configurable]]: true }.
+includes: [propertyHelper.js]
+features: [generators]
+---*/
+
+var GeneratorFunction = Object.getPrototypeOf(function*() {}).constructor;
+
+assert.sameValue(GeneratorFunction.prototype.constructor, GeneratorFunction);
+
+verifyNotEnumerable(GeneratorFunction.prototype, 'constructor');
+verifyNotWritable(GeneratorFunction.prototype, 'constructor');
+verifyConfigurable(GeneratorFunction.prototype, 'constructor');
+
+reportCompare(0, 0);