diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-11-06 00:58:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-06 00:58:21 +0100 |
commit | e7d7da85dff177bbc919cab48643135c68e065bd (patch) | |
tree | ee6ddb2abe715b80ad0334750e262ef7145f7975 /cli/tests/integration/npm_tests.rs | |
parent | 384e53308a7d7e5d503e9cbf9950ab428048ac4c (diff) |
fix(npm): fix CJS resolution with local node_modules dir (#16547)
This commit fixes CJS resolution when there's a local "node_modules/"
directory.
Before this commit relative imports from CJS files where resolved
relative to
root directory of the package instead of relative to referrer file.
Diffstat (limited to 'cli/tests/integration/npm_tests.rs')
-rw-r--r-- | cli/tests/integration/npm_tests.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/tests/integration/npm_tests.rs b/cli/tests/integration/npm_tests.rs index 72af72a76..5dae2fd1c 100644 --- a/cli/tests/integration/npm_tests.rs +++ b/cli/tests/integration/npm_tests.rs @@ -641,6 +641,14 @@ itest!(node_modules_dir_with_deps { temp_cwd: true, }); +itest!(node_modules_dir_yargs { + args: "run --allow-read --allow-env --unstable --node-modules-dir $TESTDATA/npm/cjs_yargs/main.js", + output: "npm/cjs_yargs/main.out", + envs: env_vars(), + http_server: true, + temp_cwd: true, +}); + #[test] fn node_modules_dir_cache() { let _server = http_server(); |