summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/tests/integration_tests.rs6
-rw-r--r--cli/tests/top_level_await.js3
-rw-r--r--cli/tests/top_level_await.out3
3 files changed, 12 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index eb315d040..fd5efca18 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -427,6 +427,7 @@ itest!(error_013_missing_script {
itest!(error_014_catch_dynamic_import_error {
args: "error_014_catch_dynamic_import_error.js --reload --allow-read",
output: "error_014_catch_dynamic_import_error.js.out",
+ exit_code: 1,
});
itest!(error_015_dynamic_import_permissions {
@@ -549,3 +550,8 @@ itest!(wasm_async {
args: "wasm_async.js",
output: "wasm_async.out",
});
+
+itest!(top_level_await {
+ args: "--allow-read top_level_await.js",
+ output: "top_level_await.out",
+});
diff --git a/cli/tests/top_level_await.js b/cli/tests/top_level_await.js
new file mode 100644
index 000000000..af6fbd662
--- /dev/null
+++ b/cli/tests/top_level_await.js
@@ -0,0 +1,3 @@
+const buf = await Deno.readFile("hello.txt");
+const n = await Deno.stdout.write(buf);
+console.log(`\n\nwrite ${n}`);
diff --git a/cli/tests/top_level_await.out b/cli/tests/top_level_await.out
new file mode 100644
index 000000000..4b65d15fe
--- /dev/null
+++ b/cli/tests/top_level_await.out
@@ -0,0 +1,3 @@
+Hello world!
+
+write 12