summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/top_level_for_await.js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/top_level_for_await.js')
-rw-r--r--cli/tests/testdata/top_level_for_await.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/tests/testdata/top_level_for_await.js b/cli/tests/testdata/top_level_for_await.js
new file mode 100644
index 000000000..a330f6c71
--- /dev/null
+++ b/cli/tests/testdata/top_level_for_await.js
@@ -0,0 +1,10 @@
+function* asyncGenerator() {
+ let i = 0;
+ while (i < 3) {
+ yield i++;
+ }
+}
+
+for await (const num of asyncGenerator()) {
+ console.log(num);
+}