From a497f87b59a5271d89cf50063154c46c4e52c523 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 24 Sep 2019 18:37:04 -0400 Subject: Upgrade V8 for top-level-await (#3015) --- cli/tests/integration_tests.rs | 6 ++++++ cli/tests/top_level_await.js | 3 +++ cli/tests/top_level_await.out | 3 +++ 3 files changed, 12 insertions(+) create mode 100644 cli/tests/top_level_await.js create mode 100644 cli/tests/top_level_await.out (limited to 'cli') 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 -- cgit v1.2.3