Bug 1185106 - Part 11.6: Add test for async function expression binding identity. r=till
authorTooru Fujisawa <arai_a@mac.com>
Mon, 29 Aug 2016 14:51:10 +0900
changeset 320251 4dbc392a25d8a1978b5e9802561375b502d19c19
parent 320250 a141cb00c7deef08035c09de9ebd720fd74ff7a7
child 320252 0df8a2814d0c6a7cb905086ffef6c4236fa4e2cf
push id20754
push usercbook@mozilla.com
push dateMon, 31 Oct 2016 15:58:35 +0000
treeherderfx-team@b1b66b1780c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstill
bugs1185106
milestone52.0a1
Bug 1185106 - Part 11.6: Add test for async function expression binding identity. r=till MozReview-Commit-ID: J7YAj7XIh24
js/src/tests/ecma_7/AsyncFunctions/identity.js
new file mode 100644
--- /dev/null
+++ b/js/src/tests/ecma_7/AsyncFunctions/identity.js
@@ -0,0 +1,14 @@
+// |reftest| skip-if(!xulRuntime.shell) -- needs drainJobQueue
+
+var BUGNUMBER = 1185106;
+var summary = "Named async function expression should get wrapped function for the name inside it";
+
+print(BUGNUMBER + ": " + summary);
+
+var expr = async function foo() {
+  return foo;
+};
+assertEventuallyEq(expr(), expr);
+
+if (typeof reportCompare === "function")
+    reportCompare(true, true);