diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2021-07-05 17:59:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-05 18:59:49 +0200 |
commit | 060dd3ae82caf7cab57dfb40a295028887ab70bb (patch) | |
tree | 708125035743ae6f5c259226ae7f3126e956a529 /cli/tests | |
parent | 407de8b8347bae165e60b9ccf0bce8050ba861fa (diff) |
fix(core): Delay deadlock detection for dynamic imports (#11282)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/run_tests.rs | 6 | ||||
-rw-r--r-- | cli/tests/top_level_await_nested.out | 5 | ||||
-rw-r--r-- | cli/tests/top_level_await_nested/a.js | 3 | ||||
-rw-r--r-- | cli/tests/top_level_await_nested/b.js | 1 | ||||
-rw-r--r-- | cli/tests/top_level_await_nested/main.js | 3 |
5 files changed, 18 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 374cd473b..14e212dd7 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -866,6 +866,12 @@ itest!(top_level_await_circular { exit_code: 1, }); +// Regression test for https://github.com/denoland/deno/issues/11238. +itest!(top_level_await_nested { + args: "run --allow-read top_level_await_nested/main.js", + output: "top_level_await_nested.out", +}); + itest!(top_level_await_unresolved { args: "run top_level_await_unresolved.js", output: "top_level_await_unresolved.out", diff --git a/cli/tests/top_level_await_nested.out b/cli/tests/top_level_await_nested.out new file mode 100644 index 000000000..8a1218a10 --- /dev/null +++ b/cli/tests/top_level_await_nested.out @@ -0,0 +1,5 @@ +1 +2 +3 +4 +5 diff --git a/cli/tests/top_level_await_nested/a.js b/cli/tests/top_level_await_nested/a.js new file mode 100644 index 000000000..74837d4ba --- /dev/null +++ b/cli/tests/top_level_await_nested/a.js @@ -0,0 +1,3 @@ +console.log(2); +await import("./b.js"); +console.log(4); diff --git a/cli/tests/top_level_await_nested/b.js b/cli/tests/top_level_await_nested/b.js new file mode 100644 index 000000000..3bd241b50 --- /dev/null +++ b/cli/tests/top_level_await_nested/b.js @@ -0,0 +1 @@ +console.log(3); diff --git a/cli/tests/top_level_await_nested/main.js b/cli/tests/top_level_await_nested/main.js new file mode 100644 index 000000000..ed46a4717 --- /dev/null +++ b/cli/tests/top_level_await_nested/main.js @@ -0,0 +1,3 @@ +console.log(1); +await import("./a.js"); +console.log(5); |