summaryrefslogtreecommitdiff
path: root/test/built-ins/AsyncGeneratorPrototype/return/name.js
diff options
context:
space:
mode:
authorValerie <spectranaut@gmail.com>2018-03-02 09:44:23 -0500
committerLeo Balter <leonardo.balter@gmail.com>2018-03-02 09:44:23 -0500
commite14a9ad9fefaf94454695e74db9873282ea22880 (patch)
treee8794a10e3a3f3049c2b1bb1da7ab4afab333efa /test/built-ins/AsyncGeneratorPrototype/return/name.js
parent4a3e19b3e4f04be2d747ca5d7529115f5cf85169 (diff)
downloadqtdeclarative-testsuites-e14a9ad9fefaf94454695e74db9873282ea22880.tar.gz
async-iteration: AsyncGeneratorPrototype tests (#1451)
Diffstat (limited to 'test/built-ins/AsyncGeneratorPrototype/return/name.js')
-rw-r--r--test/built-ins/AsyncGeneratorPrototype/return/name.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/built-ins/AsyncGeneratorPrototype/return/name.js b/test/built-ins/AsyncGeneratorPrototype/return/name.js
new file mode 100644
index 000000000..c14f4ee23
--- /dev/null
+++ b/test/built-ins/AsyncGeneratorPrototype/return/name.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2018 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-asyncgenerator-prototype-return
+description: >
+ Generator.prototype.next.name is "return".
+info: |
+ Generator.prototype.return ( value )
+
+ 17 ECMAScript Standard Built-in Objects:
+ Every built-in Function object, including constructors, that is not
+ identified as an anonymous function has a name property whose value
+ is a String.
+
+ Unless otherwise specified, the name property of a built-in Function
+ object, if it exists, has the attributes { [[Writable]]: false,
+ [[Enumerable]]: false, [[Configurable]]: true }.
+includes: [propertyHelper.js]
+features: [generators]
+---*/
+
+async function* g() {}
+var AsyncGeneratorPrototype = Object.getPrototypeOf(g).prototype;
+
+verifyProperty(AsyncGeneratorPrototype.return, "name", {
+ value: "return",
+ enumerable: false,
+ writable: false,
+ configurable: true,
+});