diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-08-24 14:54:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 14:54:20 +0200 |
commit | 5268fa0e0f34571f0fc615eb665747863aca311e (patch) | |
tree | 3c23531d8484e4821662bc822634eabb9862dd57 /cli/tests | |
parent | f3bde1d53b4710fb526286e27af29a55f5da18c7 (diff) |
fix(unstable): various resolution bugs for npm: specifiers (#15546)
Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/testdata/npm/dynamic_import/main.out | 1 | ||||
-rw-r--r-- | cli/tests/testdata/npm/dynamic_import/other.ts | 7 |
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); +} |