summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/run_tests.rs6
-rw-r--r--cli/tests/testdata/run/dynamic_import_syntax_error.js1
-rw-r--r--cli/tests/testdata/run/dynamic_import_syntax_error.js.out4
-rw-r--r--cli/tests/testdata/run/dynamic_import_syntax_error_import.js5
4 files changed, 16 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index 1d70a9cb7..b5bb04fdd 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -4352,6 +4352,12 @@ itest!(node_prefix_missing {
exit_code: 1,
});
+itest!(dynamic_import_syntax_error {
+ args: "run -A run/dynamic_import_syntax_error.js",
+ output: "run/dynamic_import_syntax_error.js.out",
+ exit_code: 1,
+});
+
itest!(extension_import {
args: "run run/extension_import.ts",
output: "run/extension_import.ts.out",
diff --git a/cli/tests/testdata/run/dynamic_import_syntax_error.js b/cli/tests/testdata/run/dynamic_import_syntax_error.js
new file mode 100644
index 000000000..be8ec132f
--- /dev/null
+++ b/cli/tests/testdata/run/dynamic_import_syntax_error.js
@@ -0,0 +1 @@
+await import("./dynamic_import_syntax_error_import.js");
diff --git a/cli/tests/testdata/run/dynamic_import_syntax_error.js.out b/cli/tests/testdata/run/dynamic_import_syntax_error.js.out
new file mode 100644
index 000000000..91e69eac7
--- /dev/null
+++ b/cli/tests/testdata/run/dynamic_import_syntax_error.js.out
@@ -0,0 +1,4 @@
+error: Uncaught (in promise) SyntaxError: Unexpected reserved word at [WILDCARD]/dynamic_import_syntax_error_import.js:3:3
+await import("./dynamic_import_syntax_error_import.js");
+^
+ at async [WILDCARD]/dynamic_import_syntax_error.js:1:1
diff --git a/cli/tests/testdata/run/dynamic_import_syntax_error_import.js b/cli/tests/testdata/run/dynamic_import_syntax_error_import.js
new file mode 100644
index 000000000..bcf075638
--- /dev/null
+++ b/cli/tests/testdata/run/dynamic_import_syntax_error_import.js
@@ -0,0 +1,5 @@
+// deno-lint-ignore-file
+function foo() {
+ await Promise.resolve();
+}
+foo();