summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/compat
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2021-11-08 16:02:40 +0900
committerGitHub <noreply@github.com>2021-11-08 16:02:40 +0900
commit8e010b6844b339ab138b4d9e40148c60d44d197a (patch)
tree8ad367d0b7bfc81b22dc2307a20efc2b57bb1363 /cli/tests/testdata/compat
parent3828a7eb11de2beeb545e464550249337ca5618a (diff)
feat(compat): add .code to dyn import error (#12633)
Diffstat (limited to 'cli/tests/testdata/compat')
-rw-r--r--cli/tests/testdata/compat/dyn_import_reject.js4
-rw-r--r--cli/tests/testdata/compat/dyn_import_reject.out2
2 files changed, 6 insertions, 0 deletions
diff --git a/cli/tests/testdata/compat/dyn_import_reject.js b/cli/tests/testdata/compat/dyn_import_reject.js
new file mode 100644
index 000000000..f9a99f0da
--- /dev/null
+++ b/cli/tests/testdata/compat/dyn_import_reject.js
@@ -0,0 +1,4 @@
+import("./foobar.js").catch((e) => {
+ console.log(e);
+ console.log(e.code);
+});
diff --git a/cli/tests/testdata/compat/dyn_import_reject.out b/cli/tests/testdata/compat/dyn_import_reject.out
new file mode 100644
index 000000000..6d78135b2
--- /dev/null
+++ b/cli/tests/testdata/compat/dyn_import_reject.out
@@ -0,0 +1,2 @@
+TypeError: Cannot load module "file:///[WILDCARD]/testdata/compat/foobar.js".
+ERR_MODULE_NOT_FOUND