summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/not-callable.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/not-callable.js')
-rw-r--r--js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/not-callable.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/not-callable.js b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/not-callable.js
new file mode 100644
index 0000000000..812d1d2f71
--- /dev/null
+++ b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/not-callable.js
@@ -0,0 +1,30 @@
+// Copyright (C) 2020 Alexey Shvayka. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-properties-of-asyncgeneratorfunction-prototype
+description: >
+ %AsyncGeneratorFunction.prototype% is an ordinary non-callable object.
+info: |
+ Properties of the AsyncGeneratorFunction Prototype Object
+
+ The AsyncGeneratorFunction prototype object:
+
+ [...]
+ * is an ordinary object.
+ * is not a function object and does not have an [[ECMAScriptCode]] internal slot
+ or any other of the internal slots listed in Table 28 or Table 75.
+features: [async-iteration]
+---*/
+
+var AsyncGeneratorFunctionPrototype = Object.getPrototypeOf(async function* () {});
+
+assert.sameValue(typeof AsyncGeneratorFunctionPrototype, "object");
+assert.throws(TypeError, function() {
+ AsyncGeneratorFunctionPrototype();
+});
+
+assert(!AsyncGeneratorFunctionPrototype.hasOwnProperty("length"), "length");
+assert(!AsyncGeneratorFunctionPrototype.hasOwnProperty("name"), "name");
+
+reportCompare(0, 0);