diff options
author | await-ovo <13152410380@163.com> | 2023-09-19 04:02:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-18 20:02:58 +0000 |
commit | dc1da309274823c15ad8ade0545678f8a9b8e54d (patch) | |
tree | 95514a8d53c3bcea02f07ac995946c68e5a37fa6 /cli/tests/integration/npm_tests.rs | |
parent | f5963b6a0595810c0e4b6da793ce0d50a9944796 (diff) |
fix(cli): for main-module that exists in package.json, use the version defined in package.json directly (#20328)
Diffstat (limited to 'cli/tests/integration/npm_tests.rs')
-rw-r--r-- | cli/tests/integration/npm_tests.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cli/tests/integration/npm_tests.rs b/cli/tests/integration/npm_tests.rs index edd100d7d..09330a80c 100644 --- a/cli/tests/integration/npm_tests.rs +++ b/cli/tests/integration/npm_tests.rs @@ -448,6 +448,27 @@ itest!(permissions_outside_package { http_server: true, }); +itest!(run_existing_npm_package { + args: "run --allow-read --node-modules-dir npm:@denotest/bin", + output: "npm/run_existing_npm_package/main.out", + envs: env_vars_for_npm_tests(), + http_server: true, + temp_cwd: true, + cwd: Some("npm/run_existing_npm_package/"), + copy_temp_dir: Some("npm/run_existing_npm_package/"), +}); + +itest!(run_existing_npm_package_with_subpath { + args: + "run --allow-read --node-modules-dir npm:@denotest/bin/cli-esm dev --help", + output: "npm/run_existing_npm_package_with_subpath/main.out", + envs: env_vars_for_npm_tests(), + http_server: true, + temp_cwd: true, + cwd: Some("npm/run_existing_npm_package_with_subpath/"), + copy_temp_dir: Some("npm/run_existing_npm_package_with_subpath/"), +}); + #[test] fn parallel_downloading() { let (out, _err) = util::run_and_collect_output_with_args( |