summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/testdata/npm/dynamic_import/main.out1
-rw-r--r--cli/tests/testdata/npm/dynamic_import/other.ts7
2 files changed, 8 insertions, 0 deletions
diff --git a/cli/tests/testdata/npm/dynamic_import/main.out b/cli/tests/testdata/npm/dynamic_import/main.out
index 7e2fb7a0f..cefb3ad44 100644
--- a/cli/tests/testdata/npm/dynamic_import/main.out
+++ b/cli/tests/testdata/npm/dynamic_import/main.out
@@ -3,3 +3,4 @@ Download http://localhost:4545/npm/registry/chalk
Download http://localhost:4545/npm/registry/chalk/chalk-5.0.1.tgz
B
C
+devDependency import failed: TypeError: Relative import path "xo"[WILDCARD] \ No newline at end of file
diff --git a/cli/tests/testdata/npm/dynamic_import/other.ts b/cli/tests/testdata/npm/dynamic_import/other.ts
index e5d3b6dc3..008f8833e 100644
--- a/cli/tests/testdata/npm/dynamic_import/other.ts
+++ b/cli/tests/testdata/npm/dynamic_import/other.ts
@@ -2,3 +2,10 @@ console.log("B");
const chalk = (await import("npm:chalk@5")).default;
console.log(chalk.green("C"));
+
+try {
+ // Trying to import a devDependency should result in an error
+ await import("xo");
+} catch (e) {
+ console.error("devDependency import failed:", e);
+}