summaryrefslogtreecommitdiff
path: root/tests/specs/run/fix_dynamic_import_errors
diff options
context:
space:
mode:
authorhaturau <135221985+haturatu@users.noreply.github.com>2024-11-20 01:20:47 +0900
committerGitHub <noreply@github.com>2024-11-20 01:20:47 +0900
commit85719a67e59c7aa45bead26e4942d7df8b1b42d4 (patch)
treeface0aecaac53e93ce2f23b53c48859bcf1a36ec /tests/specs/run/fix_dynamic_import_errors
parent67697bc2e4a62a9670699fd18ad0dd8efc5bd955 (diff)
parent186b52731c6bb326c4d32905c5e732d082e83465 (diff)
Merge branch 'denoland:main' into main
Diffstat (limited to 'tests/specs/run/fix_dynamic_import_errors')
-rw-r--r--tests/specs/run/fix_dynamic_import_errors/__test__.jsonc4
-rw-r--r--tests/specs/run/fix_dynamic_import_errors/b.js2
-rw-r--r--tests/specs/run/fix_dynamic_import_errors/c.js2
-rw-r--r--tests/specs/run/fix_dynamic_import_errors/fix_dynamic_import_errors.js7
-rw-r--r--tests/specs/run/fix_dynamic_import_errors/fix_dynamic_import_errors.js.out2
5 files changed, 17 insertions, 0 deletions
diff --git a/tests/specs/run/fix_dynamic_import_errors/__test__.jsonc b/tests/specs/run/fix_dynamic_import_errors/__test__.jsonc
new file mode 100644
index 000000000..d9302d2ca
--- /dev/null
+++ b/tests/specs/run/fix_dynamic_import_errors/__test__.jsonc
@@ -0,0 +1,4 @@
+{
+ "args": "run --reload fix_dynamic_import_errors.js",
+ "output": "fix_dynamic_import_errors.js.out"
+}
diff --git a/tests/specs/run/fix_dynamic_import_errors/b.js b/tests/specs/run/fix_dynamic_import_errors/b.js
new file mode 100644
index 000000000..6ea50d360
--- /dev/null
+++ b/tests/specs/run/fix_dynamic_import_errors/b.js
@@ -0,0 +1,2 @@
+import "./bad.mjs";
+export default () => "error";
diff --git a/tests/specs/run/fix_dynamic_import_errors/c.js b/tests/specs/run/fix_dynamic_import_errors/c.js
new file mode 100644
index 000000000..20546455e
--- /dev/null
+++ b/tests/specs/run/fix_dynamic_import_errors/c.js
@@ -0,0 +1,2 @@
+await import("./bad2.mjs");
+export default () => "error";
diff --git a/tests/specs/run/fix_dynamic_import_errors/fix_dynamic_import_errors.js b/tests/specs/run/fix_dynamic_import_errors/fix_dynamic_import_errors.js
new file mode 100644
index 000000000..e105cbada
--- /dev/null
+++ b/tests/specs/run/fix_dynamic_import_errors/fix_dynamic_import_errors.js
@@ -0,0 +1,7 @@
+import("./b.js").catch(() => {
+ console.log("caught import error from b.js");
+});
+
+import("./c.js").catch(() => {
+ console.log("caught import error from c.js");
+});
diff --git a/tests/specs/run/fix_dynamic_import_errors/fix_dynamic_import_errors.js.out b/tests/specs/run/fix_dynamic_import_errors/fix_dynamic_import_errors.js.out
new file mode 100644
index 000000000..e7856fb9c
--- /dev/null
+++ b/tests/specs/run/fix_dynamic_import_errors/fix_dynamic_import_errors.js.out
@@ -0,0 +1,2 @@
+caught import error from [WILDCARD].js
+caught import error from [WILDCARD].js