summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Sulaiman <mohammad.sulaiman@exalt.ps>2024-09-25 21:46:18 +0300
committerGitHub <noreply@github.com>2024-09-25 18:46:18 +0000
commitc232ecc6af5a09a8f0480e3b2b87ef2cd2b3a348 (patch)
tree49874a35cc2d27d90d0ec26423e8bfe040385683
parent8cdb309ffd6686b2f3c4a2126d927fd5770be34d (diff)
chore: deprecate npm itests (#25804)
-rw-r--r--tests/integration/npm_tests.rs713
-rw-r--r--tests/specs/npm_tests/builtin_module_module/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.js (renamed from tests/testdata/npm/builtin_module_module/main.js)0
-rw-r--r--tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.out (renamed from tests/testdata/npm/builtin_module_module/main.out)0
-rw-r--r--tests/specs/npm_tests/cached_only/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/cached_only/cached_only/main.out2
-rw-r--r--tests/specs/npm_tests/cached_only/cached_only/main.ts3
-rw-r--r--tests/specs/npm_tests/check_all/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/check_all/check_errors/main.ts (renamed from tests/testdata/npm/check_errors/main.ts)0
-rw-r--r--tests/specs/npm_tests/check_all/check_errors/main_all.out (renamed from tests/testdata/npm/check_errors/main_all.out)0
-rw-r--r--tests/specs/npm_tests/check_all/check_errors/main_local.out (renamed from tests/testdata/npm/check_errors/main_local.out)0
-rw-r--r--tests/specs/npm_tests/check_local/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/check_local/check_errors/main.ts3
-rw-r--r--tests/specs/npm_tests/check_local/check_errors/main_all.out19
-rw-r--r--tests/specs/npm_tests/check_local/check_errors/main_local.out7
-rw-r--r--tests/specs/npm_tests/check_package_file_dts_dmts_dcts/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out (renamed from tests/testdata/npm/file_dts_dmts_dcts/main.out)0
-rw-r--r--tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.ts (renamed from tests/testdata/npm/file_dts_dmts_dcts/main.ts)0
-rw-r--r--tests/specs/npm_tests/child_process_fork_test/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.out (renamed from tests/testdata/npm/child_process_fork_test/main.out)0
-rw-r--r--tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.ts (renamed from tests/testdata/npm/child_process_fork_test/main.ts)0
-rw-r--r--tests/specs/npm_tests/cjs_invalid_name_exports/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out (renamed from tests/testdata/npm/cjs-invalid-name-exports/main.out)0
-rw-r--r--tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.ts (renamed from tests/testdata/npm/cjs-invalid-name-exports/main.ts)0
-rw-r--r--tests/specs/npm_tests/cjs_local_global_decls/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.out (renamed from tests/testdata/npm/cjs_local_global_decls/main.out)0
-rw-r--r--tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.ts (renamed from tests/testdata/npm/cjs_local_global_decls/main.ts)0
-rw-r--r--tests/specs/npm_tests/cjs_module_export_assignment/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.out (renamed from tests/testdata/npm/cjs_module_export_assignment/main.out)0
-rw-r--r--tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.ts (renamed from tests/testdata/npm/cjs_module_export_assignment/main.ts)0
-rw-r--r--tests/specs/npm_tests/cjs_module_export_assignment_number/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out (renamed from tests/testdata/npm/cjs_module_export_assignment_number/main.out)0
-rw-r--r--tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.ts (renamed from tests/testdata/npm/cjs_module_export_assignment_number/main.ts)0
-rw-r--r--tests/specs/npm_tests/cjs_pkg_imports/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.out (renamed from tests/testdata/npm/cjs_pkg_imports/main.out)0
-rw-r--r--tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.ts (renamed from tests/testdata/npm/cjs_pkg_imports/main.ts)0
-rw-r--r--tests/specs/npm_tests/cjs_reexport_collision/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.out (renamed from tests/testdata/npm/cjs_reexport_collision/main.out)0
-rw-r--r--tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.ts (renamed from tests/testdata/npm/cjs_reexport_collision/main.ts)0
-rw-r--r--tests/specs/npm_tests/cjs_require_esm/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.out (renamed from tests/testdata/npm/cjs_require_esm/main.out)0
-rw-r--r--tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.ts (renamed from tests/testdata/npm/cjs_require_esm/main.ts)0
-rw-r--r--tests/specs/npm_tests/cjs_require_esm_mjs/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out (renamed from tests/testdata/npm/cjs_require_esm_mjs/main.out)0
-rw-r--r--tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.ts (renamed from tests/testdata/npm/cjs_require_esm_mjs/main.ts)0
-rw-r--r--tests/specs/npm_tests/cjs_sub_path/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.js (renamed from tests/testdata/npm/cjs_sub_path/main.js)0
-rw-r--r--tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.out (renamed from tests/testdata/npm/cjs_sub_path/main.out)0
-rw-r--r--tests/specs/npm_tests/cjs_this_in_exports/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.js (renamed from tests/testdata/npm/cjs_this_in_exports/main.js)0
-rw-r--r--tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.out (renamed from tests/testdata/npm/cjs_this_in_exports/main.out)2
-rw-r--r--tests/specs/npm_tests/cjs_with_deps/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js12
-rw-r--r--tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out33
-rw-r--r--tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info.out22
-rw-r--r--tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info_json.out148
-rw-r--r--tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_node_modules.out47
-rw-r--r--tests/specs/npm_tests/compare_globals/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/compare_globals/compare_globals/main.out (renamed from tests/testdata/npm/compare_globals/main.out)2
-rw-r--r--tests/specs/npm_tests/compare_globals/compare_globals/main.ts (renamed from tests/testdata/npm/compare_globals/main.ts)0
-rw-r--r--tests/specs/npm_tests/create_require/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/create_require/create_require/main.out (renamed from tests/testdata/npm/create_require/main.out)0
-rw-r--r--tests/specs/npm_tests/create_require/create_require/main.ts (renamed from tests/testdata/npm/create_require/main.ts)0
-rw-r--r--tests/specs/npm_tests/deno_cache/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/deno_cache/deno_cache.out (renamed from tests/testdata/npm/deno_cache.out)0
-rw-r--r--tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/deno_run_bin_cjs/deno_run_cjs.out (renamed from tests/testdata/npm/deno_run_no_ext.out)0
-rw-r--r--tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out (renamed from tests/testdata/npm/deno_run_special_chars_in_bin_name.out)0
-rw-r--r--tests/specs/npm_tests/deno_run_bin_esm/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out4
-rw-r--r--tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out4
-rw-r--r--tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/deno_run_bin_no_ext/deno_run_no_ext.out4
-rw-r--r--tests/specs/npm_tests/deno_run_bin_special_chars/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out4
-rw-r--r--tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/deno_run_cowsay/deno_run_cowsay.out8
-rw-r--r--tests/specs/npm_tests/deno_run_cowsay_explicit/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/deno_run_cowsay_explicit/deno_run_cowsay.out8
-rw-r--r--tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out8
-rw-r--r--tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/deno_run_cowthink/deno_run_cowthink.out8
-rw-r--r--tests/specs/npm_tests/deno_run_no_bin_entrypoint/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/deno_run_no_bin_entrypoint/deno_run_no_bin_entrypoint.out (renamed from tests/testdata/npm/deno_run_no_bin_entrypoint.out)0
-rw-r--r--tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/deno_run_no_bin_entrypoint_non_existent_subpath.out (renamed from tests/testdata/npm/deno_run_no_bin_entrypoint_non_existent_subpath.out)0
-rw-r--r--tests/specs/npm_tests/deno_run_non_existent/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/deno_run_non_existent/deno_run_non_existent.out (renamed from tests/testdata/npm/deno_run_non_existent.out)0
-rw-r--r--tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js5
-rw-r--r--tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out2
-rw-r--r--tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json6
-rw-r--r--tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js5
-rw-r--r--tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out2
-rw-r--r--tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json6
-rw-r--r--tests/specs/npm_tests/directory_import_folder_index_js/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.out (renamed from tests/testdata/npm/directory_import/folder_index_js.out)0
-rw-r--r--tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.ts (renamed from tests/testdata/npm/directory_import/folder_index_js.ts)0
-rw-r--r--tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.out (renamed from tests/testdata/npm/directory_import/folder_no_index.out)0
-rw-r--r--tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.ts (renamed from tests/testdata/npm/directory_import/folder_no_index.ts)0
-rw-r--r--tests/specs/npm_tests/directory_import_folder_no_index/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.out7
-rw-r--r--tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.ts2
-rw-r--r--tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.out6
-rw-r--r--tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.ts2
-rw-r--r--tests/specs/npm_tests/dual_cjs_esm/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.out3
-rw-r--r--tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.ts6
-rw-r--r--tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts (renamed from tests/testdata/npm/dynamic_import_deno_ts_from_npm/add.ts)0
-rw-r--r--tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out (renamed from tests/testdata/npm/dynamic_import_deno_ts_from_npm/main.out)0
-rw-r--r--tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts (renamed from tests/testdata/npm/dynamic_import_deno_ts_from_npm/main.ts)0
-rw-r--r--tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/subtract.mts (renamed from tests/testdata/npm/dynamic_import_deno_ts_from_npm/subtract.mts)0
-rw-r--r--tests/specs/npm_tests/dynamic_import_invalid_package_name/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out (renamed from tests/testdata/npm/dynamic_import_invalid_package_name/main.out)0
-rw-r--r--tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.ts (renamed from tests/testdata/npm/dynamic_import_invalid_package_name/main.ts)0
-rw-r--r--tests/specs/npm_tests/dynamic_import_json/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/dynamic_import_json/import_json/main.js (renamed from tests/testdata/npm/import_json/main.js)0
-rw-r--r--tests/specs/npm_tests/dynamic_import_json/import_json/main.out (renamed from tests/testdata/npm/import_json/main.out)0
-rw-r--r--tests/specs/npm_tests/dynamic_import_reload_same_package/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out (renamed from tests/testdata/npm/dynamic_import_reload_same_package/main.out)0
-rw-r--r--tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts (renamed from tests/testdata/npm/dynamic_import_reload_same_package/main.ts)0
-rw-r--r--tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/other.ts (renamed from tests/testdata/npm/dynamic_import_reload_same_package/other.ts)0
-rw-r--r--tests/specs/npm_tests/env_var_re_export_dev/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/env_var_re_export_dev/env_var_re_export/main.js (renamed from tests/testdata/npm/env_var_re_export/main.js)0
-rw-r--r--tests/specs/npm_tests/env_var_re_export_prod/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/env_var_re_export_prod/env_var_re_export/main.js3
-rw-r--r--tests/specs/npm_tests/error_version_after_subpath/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.js (renamed from tests/testdata/npm/error_version_after_subpath/main.js)0
-rw-r--r--tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.out (renamed from tests/testdata/npm/error_version_after_subpath/main.out)2
-rw-r--r--tests/specs/npm_tests/import_json/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/import_json/import_json/main.js4
-rw-r--r--tests/specs/npm_tests/import_json/import_json/main.out10
-rw-r--r--tests/specs/npm_tests/import_map/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/import_map/import_map/import_map.json (renamed from tests/testdata/npm/import_map/import_map.json)0
-rw-r--r--tests/specs/npm_tests/import_map/import_map/main.js (renamed from tests/testdata/npm/import_map/main.js)0
-rw-r--r--tests/specs/npm_tests/import_map/import_map/main.out (renamed from tests/testdata/npm/import_map/main.out)0
-rw-r--r--tests/specs/npm_tests/imports_package_json/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.js (renamed from tests/testdata/npm/imports_package_json/import_not_defined.js)0
-rw-r--r--tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.out (renamed from tests/testdata/npm/imports_package_json/import_not_defined.out)0
-rw-r--r--tests/specs/npm_tests/imports_package_json/imports_package_json/main.js (renamed from tests/testdata/npm/imports_package_json/main.js)0
-rw-r--r--tests/specs/npm_tests/imports_package_json/imports_package_json/main.out (renamed from tests/testdata/npm/imports_package_json/main.out)0
-rw-r--r--tests/specs/npm_tests/imports_package_json/imports_package_json/package.json (renamed from tests/testdata/npm/imports_package_json/package.json)0
-rw-r--r--tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.js (renamed from tests/testdata/npm/imports_package_json/sub_path_import_not_defined.js)0
-rw-r--r--tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.out (renamed from tests/testdata/npm/imports_package_json/sub_path_import_not_defined.out)0
-rw-r--r--tests/specs/npm_tests/imports_package_json_import_not_defined/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js3
-rw-r--r--tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out3
-rw-r--r--tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.js7
-rw-r--r--tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.out7
-rw-r--r--tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/package.json6
-rw-r--r--tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js3
-rw-r--r--tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out3
-rw-r--r--tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js3
-rw-r--r--tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out3
-rw-r--r--tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js7
-rw-r--r--tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out7
-rw-r--r--tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json6
-rw-r--r--tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js3
-rw-r--r--tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out3
-rw-r--r--tests/specs/npm_tests/info_chalk_display/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.js12
-rw-r--r--tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.out33
-rw-r--r--tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info.out22
-rw-r--r--tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info_json.out148
-rw-r--r--tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_node_modules.out47
-rw-r--r--tests/specs/npm_tests/info_chalk_display_node_modules_dir/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.js12
-rw-r--r--tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.out33
-rw-r--r--tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out22
-rw-r--r--tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out148
-rw-r--r--tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out47
-rw-r--r--tests/specs/npm_tests/info_chalk_json/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.js12
-rw-r--r--tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.out33
-rw-r--r--tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info.out22
-rw-r--r--tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info_json.out148
-rw-r--r--tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_node_modules.out47
-rw-r--r--tests/specs/npm_tests/info_chalk_json_node_modules_dir/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.js12
-rw-r--r--tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.out33
-rw-r--r--tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out22
-rw-r--r--tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out148
-rw-r--r--tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out47
-rw-r--r--tests/specs/npm_tests/info_cli_chalk_display/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/info_cli_chalk_display/info/chalk.out (renamed from tests/testdata/npm/info/chalk.out)0
-rw-r--r--tests/specs/npm_tests/info_cli_chalk_display/info/chalk_json.out (renamed from tests/testdata/npm/info/chalk_json.out)0
-rw-r--r--tests/specs/npm_tests/info_cli_chalk_json/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/info_cli_chalk_json/info/chalk.out9
-rw-r--r--tests/specs/npm_tests/info_cli_chalk_json/info/chalk_json.out57
-rw-r--r--tests/specs/npm_tests/info_peer_deps/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.out14
-rw-r--r--tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.ts5
-rw-r--r--tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info.out14
-rw-r--r--tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out97
-rw-r--r--tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out9
-rw-r--r--tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out19
-rw-r--r--tests/specs/npm_tests/info_peer_deps_json/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.out14
-rw-r--r--tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.ts5
-rw-r--r--tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out14
-rw-r--r--tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out97
-rw-r--r--tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out9
-rw-r--r--tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out19
-rw-r--r--tests/specs/npm_tests/mixed_case_package_name_global_dir/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.out (renamed from tests/testdata/npm/mixed_case_package_name/global.out)0
-rw-r--r--tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts (renamed from tests/testdata/npm/mixed_case_package_name/global.ts)0
-rw-r--r--tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.out (renamed from tests/testdata/npm/mixed_case_package_name/local.out)0
-rw-r--r--tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts (renamed from tests/testdata/npm/mixed_case_package_name/local.ts)0
-rw-r--r--tests/specs/npm_tests/mixed_case_package_name_local_dir/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.out9
-rw-r--r--tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts2
-rw-r--r--tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.out13
-rw-r--r--tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts18
-rw-r--r--tests/specs/npm_tests/node_modules_deno_node_modules/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out (renamed from tests/testdata/npm/node_modules_deno_node_modules/main.out)0
-rw-r--r--tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.ts (renamed from tests/testdata/npm/node_modules_deno_node_modules/main.ts)0
-rw-r--r--tests/specs/npm_tests/node_modules_deno_node_modules_local/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out2
-rw-r--r--tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts7
-rw-r--r--tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js (renamed from tests/testdata/npm/require_added_nm_folder/main.js)0
-rw-r--r--tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.out (renamed from tests/testdata/npm/require_added_nm_folder/main.out)0
-rw-r--r--tests/specs/npm_tests/node_modules_dir_require_main_entry/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.js (renamed from tests/testdata/npm/require_main/main.js)0
-rw-r--r--tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.out (renamed from tests/testdata/npm/require_main/main.out)0
-rw-r--r--tests/specs/npm_tests/node_modules_dir_with_deps/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.js12
-rw-r--r--tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.out33
-rw-r--r--tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info.out22
-rw-r--r--tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out148
-rw-r--r--tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out47
-rw-r--r--tests/specs/npm_tests/node_modules_dir_yargs/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.js (renamed from tests/testdata/npm/cjs_yargs/main.js)0
-rw-r--r--tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.out (renamed from tests/testdata/npm/cjs_yargs/main.out)0
-rw-r--r--tests/specs/npm_tests/non_existent_dep/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/non_existent_dep_version/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/nonexistent_file/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.js (renamed from tests/testdata/npm/nonexistent_file/main.js)0
-rw-r--r--tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.out (renamed from tests/testdata/npm/nonexistent_file/main.out)0
-rw-r--r--tests/specs/npm_tests/nonexistent_file_node_modules_dir/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.js2
-rw-r--r--tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.out4
-rw-r--r--tests/specs/npm_tests/permissions_outside_package/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/config.js (renamed from tests/testdata/npm/permissions_outside_package/foo/config.js)0
-rw-r--r--tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/package.json (renamed from tests/testdata/npm/permissions_outside_package/foo/package.json)0
-rw-r--r--tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.out (renamed from tests/testdata/npm/permissions_outside_package/main.out)0
-rw-r--r--tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.ts (renamed from tests/testdata/npm/permissions_outside_package/main.ts)2
-rw-r--r--tests/specs/npm_tests/remote_npm_specifier/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.out (renamed from tests/testdata/npm/remote_npm_specifier/main.out)0
-rw-r--r--tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.ts1
-rw-r--r--tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/remote.ts (renamed from tests/testdata/npm/remote_npm_specifier/remote.ts)0
-rw-r--r--tests/specs/npm_tests/require_esm/__test__.jsonc4
-rw-r--r--tests/specs/npm_tests/require_esm/require_esm/esm.js1
-rw-r--r--tests/specs/npm_tests/require_esm/require_esm/main.out1
-rw-r--r--tests/specs/npm_tests/require_esm/require_esm/main.ts5
-rw-r--r--tests/specs/npm_tests/require_json/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/require_json/require_json/main.js (renamed from tests/testdata/npm/require_json/main.js)0
-rw-r--r--tests/specs/npm_tests/require_json/require_json/main.out (renamed from tests/testdata/npm/require_json/main.out)0
-rw-r--r--tests/specs/npm_tests/reserved_word_exports/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.out (renamed from tests/testdata/npm/reserved_word_exports/main.out)0
-rw-r--r--tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.ts (renamed from tests/testdata/npm/reserved_word_exports/main.ts)0
-rw-r--r--tests/specs/npm_tests/run_existing_npm_package_with_subpath/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out (renamed from tests/testdata/npm/run_existing_npm_package_with_subpath/main.out)0
-rw-r--r--tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/package.json (renamed from tests/testdata/npm/run_existing_npm_package_with_subpath/package.json)0
-rw-r--r--tests/specs/npm_tests/sub_paths/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/sub_paths/sub_paths/main.jsx (renamed from tests/testdata/npm/sub_paths/main.jsx)0
-rw-r--r--tests/specs/npm_tests/sub_paths/sub_paths/main.out (renamed from tests/testdata/npm/sub_paths/main.out)0
-rw-r--r--tests/specs/npm_tests/tarball_with_global_header/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.js (renamed from tests/testdata/npm/tarball_with_global_header/main.js)0
-rw-r--r--tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.out (renamed from tests/testdata/npm/tarball_with_global_header/main.out)0
-rw-r--r--tests/specs/npm_tests/translate_cjs_to_esm/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.js (renamed from tests/testdata/npm/translate_cjs_to_esm/main.js)0
-rw-r--r--tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.out (renamed from tests/testdata/npm/translate_cjs_to_esm/main.out)0
-rw-r--r--tests/specs/npm_tests/types_ambient_module/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/types_ambient_module/types_ambient_module/import_map.json (renamed from tests/testdata/npm/types_ambient_module/import_map.json)0
-rw-r--r--tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.out (renamed from tests/testdata/npm/types_ambient_module/main.out)0
-rw-r--r--tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.ts (renamed from tests/testdata/npm/types_ambient_module/main.ts)0
-rw-r--r--tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.out (renamed from tests/testdata/npm/types_ambient_module/main_import_map.out)0
-rw-r--r--tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.ts (renamed from tests/testdata/npm/types_ambient_module/main_import_map.ts)0
-rw-r--r--tests/specs/npm_tests/types_ambient_module_import_map/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/import_map.json5
-rw-r--r--tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.out21
-rw-r--r--tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.ts7
-rw-r--r--tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.out9
-rw-r--r--tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.ts4
-rw-r--r--tests/specs/npm_tests/types_d_ext/__test__.jsonc8
-rw-r--r--tests/specs/npm_tests/types_d_ext/d_ext/main.out (renamed from tests/testdata/npm/d_ext/main.out)2
-rw-r--r--tests/specs/npm_tests/types_d_ext/d_ext/main.ts (renamed from tests/testdata/npm/d_ext/main.ts)0
-rw-r--r--tests/specs/npm_tests/types_entry_value_not_exists/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.out (renamed from tests/testdata/npm/types_entry_value_not_exists/main.out)0
-rw-r--r--tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.ts (renamed from tests/testdata/npm/types_entry_value_not_exists/main.ts)0
-rw-r--r--tests/specs/npm_tests/types_exports_import_types/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.out (renamed from tests/testdata/npm/types_exports_import_types/main.out)0
-rw-r--r--tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.ts (renamed from tests/testdata/npm/types_exports_import_types/main.ts)0
-rw-r--r--tests/specs/npm_tests/types_no_types_entry/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.out (renamed from tests/testdata/npm/types_no_types_entry/main.out)0
-rw-r--r--tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.ts (renamed from tests/testdata/npm/types_no_types_entry/main.ts)0
-rw-r--r--tests/specs/npm_tests/typescript_file_in_package/__test__.jsonc9
-rw-r--r--tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.out (renamed from tests/testdata/npm/typescript_file_in_package/main.out)0
-rw-r--r--tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.ts (renamed from tests/testdata/npm/typescript_file_in_package/main.ts)0
-rw-r--r--tests/testdata/npm/remote_npm_specifier/main.ts1
-rwxr-xr-xtools/lint.js2
308 files changed, 3038 insertions, 694 deletions
diff --git a/tests/integration/npm_tests.rs b/tests/integration/npm_tests.rs
index 004136ae7..f47b1bdd4 100644
--- a/tests/integration/npm_tests.rs
+++ b/tests/integration/npm_tests.rs
@@ -15,136 +15,6 @@ use util::TestContextBuilder;
// NOTE: See how to make test npm packages at ./testdata/npm/README.md
-itest!(cjs_with_deps {
- args: "run --allow-read --allow-env npm/cjs_with_deps/main.js",
- output: "npm/cjs_with_deps/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(cjs_sub_path {
- args: "run --allow-read npm/cjs_sub_path/main.js",
- output: "npm/cjs_sub_path/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(cjs_local_global_decls {
- args: "run --allow-read npm/cjs_local_global_decls/main.ts",
- output: "npm/cjs_local_global_decls/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(cjs_reexport_collision {
- args: "run -A --quiet npm/cjs_reexport_collision/main.ts",
- output: "npm/cjs_reexport_collision/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(cjs_this_in_exports {
- args: "run --allow-read --quiet npm/cjs_this_in_exports/main.js",
- output: "npm/cjs_this_in_exports/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(cjs_invalid_name_exports {
- args: "run --allow-read --quiet npm/cjs-invalid-name-exports/main.ts",
- output: "npm/cjs-invalid-name-exports/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(cjs_require_esm {
- args: "run --allow-read --quiet npm/cjs_require_esm/main.ts",
- output: "npm/cjs_require_esm/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(cjs_require_esm_mjs {
- args: "run --allow-read --quiet npm/cjs_require_esm_mjs/main.ts",
- output: "npm/cjs_require_esm_mjs/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(require_esm {
- args: "run --allow-read --quiet node/require_esm/main.ts",
- output: "node/require_esm/main.out",
-});
-
-itest!(dynamic_import_deno_ts_from_npm {
- args: "run --allow-read --quiet npm/dynamic_import_deno_ts_from_npm/main.ts",
- output: "npm/dynamic_import_deno_ts_from_npm/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(translate_cjs_to_esm {
- args: "run -A --quiet npm/translate_cjs_to_esm/main.js",
- output: "npm/translate_cjs_to_esm/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(compare_globals {
- args: "run --allow-read --check=all npm/compare_globals/main.ts",
- output: "npm/compare_globals/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(dual_cjs_esm {
- args: "run -A --quiet npm/dual_cjs_esm/main.ts",
- output: "npm/dual_cjs_esm/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(child_process_fork_test {
- args: "run -A --quiet npm/child_process_fork_test/main.ts",
- output: "npm/child_process_fork_test/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(cjs_module_export_assignment {
- args: "run -A --quiet --check=all npm/cjs_module_export_assignment/main.ts",
- output: "npm/cjs_module_export_assignment/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(cjs_module_export_assignment_number {
- args:
- "run -A --quiet --check=all npm/cjs_module_export_assignment_number/main.ts",
- output: "npm/cjs_module_export_assignment_number/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(mixed_case_package_name_global_dir {
- args: "run npm/mixed_case_package_name/global.ts",
- output: "npm/mixed_case_package_name/global.out",
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(mixed_case_package_name_local_dir {
- args:
- "run --node-modules-dir=auto -A $TESTDATA/npm/mixed_case_package_name/local.ts",
- output: "npm/mixed_case_package_name/local.out",
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
- temp_cwd: true,
-});
-
// FIXME(bartlomieju): npm: specifiers are not handled in dynamic imports
// at the moment
// itest!(dynamic_import {
@@ -154,211 +24,6 @@ itest!(mixed_case_package_name_local_dir {
// http_server: true,
// });
-itest!(dynamic_import_reload_same_package {
- args: "run -A --reload npm/dynamic_import_reload_same_package/main.ts",
- output: "npm/dynamic_import_reload_same_package/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(dynamic_import_invalid_package_name {
- args: "run -A --reload npm/dynamic_import_invalid_package_name/main.ts",
- output: "npm/dynamic_import_invalid_package_name/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(env_var_re_export_dev {
- args: "run --allow-read --allow-env --quiet npm/env_var_re_export/main.js",
- output_str: Some("dev\n"),
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(env_var_re_export_prod {
- args: "run --allow-read --allow-env --quiet npm/env_var_re_export/main.js",
- output_str: Some("prod\n"),
- envs: {
- let mut vars = env_vars_for_npm_tests();
- vars.push(("NODE_ENV".to_string(), "production".to_string()));
- vars
- },
- http_server: true,
-});
-
-itest!(cached_only {
- args: "run --cached-only npm/cached_only/main.ts",
- output: "npm/cached_only/main.out",
- envs: env_vars_for_npm_tests(),
- exit_code: 1,
-});
-
-itest!(import_map {
- args: "run --allow-read --allow-env --import-map npm/import_map/import_map.json npm/import_map/main.js",
- output: "npm/import_map/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(sub_paths {
- args: "run -A --quiet npm/sub_paths/main.jsx",
- output: "npm/sub_paths/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(remote_npm_specifier {
- args: "run --quiet -A npm/remote_npm_specifier/main.ts",
- output: "npm/remote_npm_specifier/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 0,
-});
-
-itest!(tarball_with_global_header {
- args: "run -A --quiet npm/tarball_with_global_header/main.js",
- output: "npm/tarball_with_global_header/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(node_modules_deno_node_modules {
- args: "run --quiet npm/node_modules_deno_node_modules/main.ts",
- output: "npm/node_modules_deno_node_modules/main.out",
- copy_temp_dir: Some("npm/node_modules_deno_node_modules/"),
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(node_modules_deno_node_modules_local {
- args:
- "run --quiet --node-modules-dir npm/node_modules_deno_node_modules/main.ts",
- output: "npm/node_modules_deno_node_modules/main.out",
- copy_temp_dir: Some("npm/node_modules_deno_node_modules/"),
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(nonexistent_file {
- args: "run -A --quiet npm/nonexistent_file/main.js",
- output: "npm/nonexistent_file/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(nonexistent_file_node_modules_dir {
- // there was a bug where the message was different when using a node_modules dir
- args: "run -A --quiet --node-modules-dir npm/nonexistent_file/main.js",
- output: "npm/nonexistent_file/main.out",
- copy_temp_dir: Some("npm/nonexistent_file/"),
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(require_json {
- args: "run -A --quiet npm/require_json/main.js",
- output: "npm/require_json/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(error_version_after_subpath {
- args: "run -A --quiet npm/error_version_after_subpath/main.js",
- output: "npm/error_version_after_subpath/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(deno_cache {
- args: "cache --reload npm:chalk npm:mkdirp",
- output: "npm/deno_cache.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(check_all {
- args: "check --all npm/check_errors/main.ts",
- output: "npm/check_errors/main_all.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(check_local {
- args: "check npm/check_errors/main.ts",
- output: "npm/check_errors/main_local.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(types_ambient_module {
- args: "check --quiet npm/types_ambient_module/main.ts",
- output: "npm/types_ambient_module/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(types_ambient_module_import_map {
- args: "check --quiet --import-map=npm/types_ambient_module/import_map.json npm/types_ambient_module/main_import_map.ts",
- output: "npm/types_ambient_module/main_import_map.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(types_entry_value_not_exists {
- args: "check --all npm/types_entry_value_not_exists/main.ts",
- output: "npm/types_entry_value_not_exists/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(types_exports_import_types {
- args: "check --all npm/types_exports_import_types/main.ts",
- output: "npm/types_exports_import_types/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(types_no_types_entry {
- args: "check --all npm/types_no_types_entry/main.ts",
- output: "npm/types_no_types_entry/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(types_d_ext {
- args: "check --all npm/d_ext/main.ts",
- output: "npm/d_ext/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(typescript_file_in_package {
- args: "run npm/typescript_file_in_package/main.ts",
- output: "npm/typescript_file_in_package/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(permissions_outside_package {
- args: "run --allow-read npm/permissions_outside_package/main.ts",
- output: "npm/permissions_outside_package/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
itest!(run_existing_npm_package {
args: "run --allow-read --node-modules-dir=auto npm:@denotest/bin",
output: "npm/run_existing_npm_package/main.out",
@@ -369,24 +34,15 @@ itest!(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=auto 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/"),
-});
-
-itest!(cjs_pkg_imports {
- args: "run -A npm/cjs_pkg_imports/main.ts",
- output: "npm/cjs_pkg_imports/main.out",
+itest!(require_resolve_url_paths {
+ args: "run -A --quiet --node-modules-dir=auto url_paths.ts",
+ output: "npm/require_resolve_url/url_paths.out",
envs: env_vars_for_npm_tests(),
http_server: true,
+ exit_code: 0,
+ cwd: Some("npm/require_resolve_url/"),
+ copy_temp_dir: Some("npm/require_resolve_url/"),
});
-
#[test]
fn parallel_downloading() {
let (out, _err) = util::run_and_collect_output_with_args(
@@ -666,77 +322,6 @@ fn deno_run_cjs_module() {
assert!(deno_dir.path().join("test_dir").exists());
}
-itest!(deno_run_cowsay {
- args: "run -A --quiet npm:cowsay@1.5.0 Hello",
- output: "npm/deno_run_cowsay.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(deno_run_cowsay_with_node_modules_dir {
- args: "run -A --quiet --node-modules-dir npm:cowsay@1.5.0 Hello",
- temp_cwd: true,
- output: "npm/deno_run_cowsay.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(deno_run_cowsay_explicit {
- args: "run -A --quiet npm:cowsay@1.5.0/cowsay Hello",
- output: "npm/deno_run_cowsay.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(deno_run_cowthink {
- args: "run -A --quiet npm:cowsay@1.5.0/cowthink Hello",
- output: "npm/deno_run_cowthink.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(deno_run_bin_esm {
- args: "run -A --quiet npm:@denotest/bin/cli-esm this is a test",
- output: "npm/deno_run_esm.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(deno_run_bin_esm_no_bin_entrypoint {
- args: "run -A --quiet npm:@denotest/bin@0.6.0/cli.mjs this is a test",
- output: "npm/deno_run_esm.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(deno_run_bin_cjs_no_bin_entrypoint {
- args: "run -A --quiet npm:@denotest/bin@0.6.0/cli-cjs.js this is a test",
- output: "npm/deno_run_cjs.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(deno_run_bin_special_chars {
- args: "run -A --quiet npm:@denotest/special-chars-in-bin-name/\\foo\" this is a test",
- output: "npm/deno_run_special_chars_in_bin_name.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(deno_run_bin_no_ext {
- args: "run -A --quiet npm:@denotest/bin/cli-no-ext this is a test",
- output: "npm/deno_run_no_ext.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(deno_run_bin_cjs {
- args: "run -A --quiet npm:@denotest/bin/cli-cjs this is a test",
- output: "npm/deno_run_cjs.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
#[test]
fn deno_run_bin_lockfile() {
let context = TestContextBuilder::for_npm().use_temp_cwd().build();
@@ -750,88 +335,6 @@ fn deno_run_bin_lockfile() {
assert!(temp_dir.path().join("deno.lock").exists());
}
-itest!(deno_run_non_existent {
- args: "run npm:mkdirp@0.5.125",
- output: "npm/deno_run_non_existent.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(deno_run_no_bin_entrypoint {
- args: "run -A --quiet npm:@denotest/esm-basic",
- output: "npm/deno_run_no_bin_entrypoint.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(deno_run_no_bin_entrypoint_non_existent_subpath {
- args: "run -A --quiet npm:@denotest/esm-basic/non-existent.js",
- output: "npm/deno_run_no_bin_entrypoint_non_existent_subpath.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(directory_import_folder_index_js {
- args: "run npm/directory_import/folder_index_js.ts",
- output: "npm/directory_import/folder_index_js.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(directory_import_folder_no_index {
- args: "run npm/directory_import/folder_no_index.ts",
- output: "npm/directory_import/folder_no_index.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(builtin_module_module {
- args: "run --allow-read --quiet npm/builtin_module_module/main.js",
- output: "npm/builtin_module_module/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(node_modules_dir_require_added_node_modules_folder {
- args:
- "run --node-modules-dir=auto -A --quiet $TESTDATA/npm/require_added_nm_folder/main.js",
- output: "npm/require_added_nm_folder/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 0,
- temp_cwd: true,
-});
-
-itest!(node_modules_dir_require_main_entry {
- args: "run --node-modules-dir -A --quiet $TESTDATA/npm/require_main/main.js",
- output: "npm/require_main/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 0,
- temp_cwd: true,
-});
-
-itest!(node_modules_dir_with_deps {
- args: "run --allow-read --allow-env --node-modules-dir=auto $TESTDATA/npm/cjs_with_deps/main.js",
- output: "npm/cjs_with_deps/main_node_modules.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- temp_cwd: true,
-});
-
-itest!(node_modules_dir_yargs {
- args: "run --allow-read --allow-env --node-modules-dir=auto $TESTDATA/npm/cjs_yargs/main.js",
- output: "npm/cjs_yargs/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- temp_cwd: true,
-});
-
#[test]
fn node_modules_dir_cache() {
let _server = http_server();
@@ -916,57 +419,6 @@ fn ensure_registry_files_local() {
}
}
-itest!(info_chalk_display {
- args: "info --quiet npm/cjs_with_deps/main.js",
- output: "npm/cjs_with_deps/main_info.out",
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(info_chalk_display_node_modules_dir {
- args: "info --quiet --node-modules-dir $TESTDATA/npm/cjs_with_deps/main.js",
- output: "npm/cjs_with_deps/main_info.out",
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
- temp_cwd: true,
-});
-
-itest!(info_chalk_json {
- args: "info --quiet --json npm/cjs_with_deps/main.js",
- output: "npm/cjs_with_deps/main_info_json.out",
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(info_chalk_json_node_modules_dir {
- args:
- "info --quiet --node-modules-dir --json $TESTDATA/npm/cjs_with_deps/main.js",
- output: "npm/cjs_with_deps/main_info_json.out",
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
- temp_cwd: true,
-});
-
-itest!(info_cli_chalk_display {
- args: "info --quiet npm:chalk@4",
- output: "npm/info/chalk.out",
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(info_cli_chalk_json {
- args: "info --quiet --json npm:chalk@4",
- output: "npm/info/chalk_json.out",
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
#[test]
fn lock_file_missing_top_level_package() {
let _server = http_server();
@@ -1526,57 +978,27 @@ fn peer_deps_with_copied_folders_and_lockfile() {
);
}
-itest!(info_peer_deps {
- args: "info --quiet npm/peer_deps_with_copied_folders/main.ts",
- output: "npm/peer_deps_with_copied_folders/main_info.out",
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(info_peer_deps_json {
- args: "info --quiet --json npm/peer_deps_with_copied_folders/main.ts",
- output: "npm/peer_deps_with_copied_folders/main_info_json.out",
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(create_require {
- args: "run --reload --allow-read npm/create_require/main.ts",
- output: "npm/create_require/main.out",
- exit_code: 0,
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(non_existent_dep {
- args: "cache npm:@denotest/non-existent-dep",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
- output_str: Some(concat!(
- "[UNORDERED_START]\n",
- "Download http://localhost:4260/@denotest/non-existent-dep\n",
- "Download http://localhost:4260/@denotest/non-existent\n",
- "[UNORDERED_END]\n",
- "error: npm package '@denotest/non-existent' does not exist.\n"
- )),
-});
+// TODO(2.0): this should be rewritten to a spec test and first run `deno install`
+// itest!(node_modules_import_run {
+// args: "run --quiet main.ts",
+// output: "npm/node_modules_import/main.out",
+// http_server: true,
+// copy_temp_dir: Some("npm/node_modules_import/"),
+// cwd: Some("npm/node_modules_import/"),
+// envs: env_vars_for_npm_tests(),
+// exit_code: 0,
+// });
-itest!(non_existent_dep_version {
- args: "cache npm:@denotest/non-existent-dep-version",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
- output_str: Some(concat!(
- "[UNORDERED_START]\n",
- "Download http://localhost:4260/@denotest/non-existent-dep-version\n",
- "Download http://localhost:4260/@denotest/esm-basic\n",
- "[UNORDERED_END]\n",
- "error: Could not find npm package '@denotest/esm-basic' matching '=99.99.99'.\n"
- )),
-});
+// TODO(2.0): this should be rewritten to a spec test and first run `deno install`
+// itest!(node_modules_import_check {
+// args: "check --quiet main.ts",
+// output: "npm/node_modules_import/main_check.out",
+// envs: env_vars_for_npm_tests(),
+// http_server: true,
+// cwd: Some("npm/node_modules_import/"),
+// copy_temp_dir: Some("npm/node_modules_import/"),
+// exit_code: 1,
+// });
// TODO(2.0): this should be rewritten to a spec test and first run `deno install`
#[test]
@@ -2047,45 +1469,6 @@ fn top_level_install_package_json_explicit_opt_in() {
assert!(node_modules_dir.join("@denotest").exists());
}
-itest!(reserved_word_exports {
- args: "run npm/reserved_word_exports/main.ts",
- output: "npm/reserved_word_exports/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(import_json {
- args: "run -A --quiet npm/import_json/main.js",
- output: "npm/import_json/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(dynamic_import_json {
- args: "run -A --quiet npm/import_json/main.js",
- output: "npm/import_json/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(check_package_file_dts_dmts_dcts {
- args: "check npm/file_dts_dmts_dcts/main.ts",
- output: "npm/file_dts_dmts_dcts/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(require_resolve_url_paths {
- args: "run -A --quiet --node-modules-dir=auto url_paths.ts",
- output: "npm/require_resolve_url/url_paths.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- exit_code: 0,
- cwd: Some("npm/require_resolve_url/"),
- copy_temp_dir: Some("npm/require_resolve_url/"),
-});
-
#[test]
fn byonm_cjs_esm_packages() {
let test_context = TestContextBuilder::for_npm().use_temp_cwd().build();
@@ -2688,50 +2071,6 @@ fn cjs_export_analysis_import_cjs_directly_relative_import() {
output.assert_matches_text("2\n");
}
-itest!(imports_package_json {
- args:
- "run --no-lock --node-modules-dir=none npm/imports_package_json/main.js",
- output: "npm/imports_package_json/main.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
-itest!(imports_package_json_import_not_defined {
- args:
- "run --no-lock --node-modules-dir=none npm/imports_package_json/import_not_defined.js",
- output: "npm/imports_package_json/import_not_defined.out",
- envs: env_vars_for_npm_tests(),
- exit_code: 1,
- http_server: true,
-});
-
-itest!(imports_package_json_sub_path_import_not_defined {
- args:
- "run --no-lock --node-modules-dir=none npm/imports_package_json/sub_path_import_not_defined.js",
- output: "npm/imports_package_json/sub_path_import_not_defined.out",
- envs: env_vars_for_npm_tests(),
- exit_code: 1,
- http_server: true,
-});
-
-itest!(different_nested_dep_node_modules_dir_false {
- args: "run --quiet --no-lock --node-modules-dir=none npm/different_nested_dep/main.js",
- output: "npm/different_nested_dep/main.out",
- envs: env_vars_for_npm_tests(),
- exit_code: 0,
- http_server: true,
-});
-
-itest!(different_nested_dep_node_modules_dir_true {
- args: "run --no-lock --quiet --node-modules-dir=auto main.js",
- output: "npm/different_nested_dep/main.out",
- copy_temp_dir: Some("npm/different_nested_dep/"),
- cwd: Some("npm/different_nested_dep/"),
- envs: env_vars_for_npm_tests(),
- exit_code: 0,
- http_server: true,
-});
-
#[test]
fn different_nested_dep_byonm() {
let test_context = TestContextBuilder::for_npm()
diff --git a/tests/specs/npm_tests/builtin_module_module/__test__.jsonc b/tests/specs/npm_tests/builtin_module_module/__test__.jsonc
new file mode 100644
index 000000000..2f26a95d4
--- /dev/null
+++ b/tests/specs/npm_tests/builtin_module_module/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read --quiet builtin_module_module/main.js",
+ "output": "builtin_module_module/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/builtin_module_module/main.js b/tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.js
index 9a036791b..9a036791b 100644
--- a/tests/testdata/npm/builtin_module_module/main.js
+++ b/tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.js
diff --git a/tests/testdata/npm/builtin_module_module/main.out b/tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.out
index 160ba6503..160ba6503 100644
--- a/tests/testdata/npm/builtin_module_module/main.out
+++ b/tests/specs/npm_tests/builtin_module_module/builtin_module_module/main.out
diff --git a/tests/specs/npm_tests/cached_only/__test__.jsonc b/tests/specs/npm_tests/cached_only/__test__.jsonc
new file mode 100644
index 000000000..764f702d2
--- /dev/null
+++ b/tests/specs/npm_tests/cached_only/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --cached-only cached_only/main.ts",
+ "output": "cached_only/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/specs/npm_tests/cached_only/cached_only/main.out b/tests/specs/npm_tests/cached_only/cached_only/main.out
new file mode 100644
index 000000000..31113eef3
--- /dev/null
+++ b/tests/specs/npm_tests/cached_only/cached_only/main.out
@@ -0,0 +1,2 @@
+error: Error getting response at http://localhost:4260/chalk for package "chalk": An npm specifier not found in cache: "chalk", --cached-only is specified.
+ at file:///[WILDCARD]/specs/npm_tests/cached_only/cached_only/main.ts:1:19
diff --git a/tests/specs/npm_tests/cached_only/cached_only/main.ts b/tests/specs/npm_tests/cached_only/cached_only/main.ts
new file mode 100644
index 000000000..1ccc441a1
--- /dev/null
+++ b/tests/specs/npm_tests/cached_only/cached_only/main.ts
@@ -0,0 +1,3 @@
+import chalk from "npm:chalk@5";
+
+console.log(chalk);
diff --git a/tests/specs/npm_tests/check_all/__test__.jsonc b/tests/specs/npm_tests/check_all/__test__.jsonc
new file mode 100644
index 000000000..427524305
--- /dev/null
+++ b/tests/specs/npm_tests/check_all/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "check --all check_errors/main.ts",
+ "output": "check_errors/main_all.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/check_errors/main.ts b/tests/specs/npm_tests/check_all/check_errors/main.ts
index 4b8684195..4b8684195 100644
--- a/tests/testdata/npm/check_errors/main.ts
+++ b/tests/specs/npm_tests/check_all/check_errors/main.ts
diff --git a/tests/testdata/npm/check_errors/main_all.out b/tests/specs/npm_tests/check_all/check_errors/main_all.out
index 4c624c0ea..4c624c0ea 100644
--- a/tests/testdata/npm/check_errors/main_all.out
+++ b/tests/specs/npm_tests/check_all/check_errors/main_all.out
diff --git a/tests/testdata/npm/check_errors/main_local.out b/tests/specs/npm_tests/check_all/check_errors/main_local.out
index 4d3a892e7..4d3a892e7 100644
--- a/tests/testdata/npm/check_errors/main_local.out
+++ b/tests/specs/npm_tests/check_all/check_errors/main_local.out
diff --git a/tests/specs/npm_tests/check_local/__test__.jsonc b/tests/specs/npm_tests/check_local/__test__.jsonc
new file mode 100644
index 000000000..1bffa5eed
--- /dev/null
+++ b/tests/specs/npm_tests/check_local/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "check check_errors/main.ts",
+ "output": "check_errors/main_local.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/specs/npm_tests/check_local/check_errors/main.ts b/tests/specs/npm_tests/check_local/check_errors/main.ts
new file mode 100644
index 000000000..4b8684195
--- /dev/null
+++ b/tests/specs/npm_tests/check_local/check_errors/main.ts
@@ -0,0 +1,3 @@
+import * as test from "npm:@denotest/check-error";
+
+console.log(test.Asdf); // should error
diff --git a/tests/specs/npm_tests/check_local/check_errors/main_all.out b/tests/specs/npm_tests/check_local/check_errors/main_all.out
new file mode 100644
index 000000000..4c624c0ea
--- /dev/null
+++ b/tests/specs/npm_tests/check_local/check_errors/main_all.out
@@ -0,0 +1,19 @@
+Download http://localhost:4260/@denotest/check-error
+Download http://localhost:4260/@denotest/check-error/1.0.0.tgz
+Check file:///[WILDCARD]/check_errors/main.ts
+error: TS2506 [ERROR]: 'Class1' is referenced directly or indirectly in its own base expression.
+export class Class1 extends Class2 {
+ ~~~~~~
+ at file:///[WILDCARD]/check-error/1.0.0/index.d.ts:2:14
+
+TS2506 [ERROR]: 'Class2' is referenced directly or indirectly in its own base expression.
+export class Class2 extends Class1 {
+ ~~~~~~
+ at file:///[WILDCARD]/check-error/1.0.0/index.d.ts:5:14
+
+TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'.
+console.log(test.Asdf); // should error
+ ~~~~
+ at file:///[WILDCARD]/check_errors/main.ts:3:18
+
+Found 3 errors.
diff --git a/tests/specs/npm_tests/check_local/check_errors/main_local.out b/tests/specs/npm_tests/check_local/check_errors/main_local.out
new file mode 100644
index 000000000..1a150b5e6
--- /dev/null
+++ b/tests/specs/npm_tests/check_local/check_errors/main_local.out
@@ -0,0 +1,7 @@
+Download http://localhost:4260/@denotest/check-error
+Download http://localhost:4260/@denotest/check-error/1.0.0.tgz
+Check file:///[WILDCARD]/check_errors/main.ts
+error: TS2339 [ERROR]: Property 'Asdf' does not exist on type 'typeof import("file:///[WILDCARD]/@denotest/check-error/1.0.0/index.d.ts")'.
+console.log(test.Asdf); // should error
+ ~~~~
+ at file:///[WILDCARD]/check_errors/main.ts:3:18
diff --git a/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/__test__.jsonc b/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/__test__.jsonc
new file mode 100644
index 000000000..675051a69
--- /dev/null
+++ b/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "check file_dts_dmts_dcts/main.ts",
+ "output": "file_dts_dmts_dcts/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/file_dts_dmts_dcts/main.out b/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out
index 507d2c2f7..507d2c2f7 100644
--- a/tests/testdata/npm/file_dts_dmts_dcts/main.out
+++ b/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.out
diff --git a/tests/testdata/npm/file_dts_dmts_dcts/main.ts b/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.ts
index 63686e2d3..63686e2d3 100644
--- a/tests/testdata/npm/file_dts_dmts_dcts/main.ts
+++ b/tests/specs/npm_tests/check_package_file_dts_dmts_dcts/file_dts_dmts_dcts/main.ts
diff --git a/tests/specs/npm_tests/child_process_fork_test/__test__.jsonc b/tests/specs/npm_tests/child_process_fork_test/__test__.jsonc
new file mode 100644
index 000000000..f83cb051e
--- /dev/null
+++ b/tests/specs/npm_tests/child_process_fork_test/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet child_process_fork_test/main.ts",
+ "output": "child_process_fork_test/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/child_process_fork_test/main.out b/tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.out
index d5bc57741..d5bc57741 100644
--- a/tests/testdata/npm/child_process_fork_test/main.out
+++ b/tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.out
diff --git a/tests/testdata/npm/child_process_fork_test/main.ts b/tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.ts
index e560edb7e..e560edb7e 100644
--- a/tests/testdata/npm/child_process_fork_test/main.ts
+++ b/tests/specs/npm_tests/child_process_fork_test/child_process_fork_test/main.ts
diff --git a/tests/specs/npm_tests/cjs_invalid_name_exports/__test__.jsonc b/tests/specs/npm_tests/cjs_invalid_name_exports/__test__.jsonc
new file mode 100644
index 000000000..a38b8d035
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_invalid_name_exports/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read --quiet cjs-invalid-name-exports/main.ts",
+ "output": "cjs-invalid-name-exports/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/cjs-invalid-name-exports/main.out b/tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out
index 45ec15d0e..45ec15d0e 100644
--- a/tests/testdata/npm/cjs-invalid-name-exports/main.out
+++ b/tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.out
diff --git a/tests/testdata/npm/cjs-invalid-name-exports/main.ts b/tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.ts
index 9bdf0e43b..9bdf0e43b 100644
--- a/tests/testdata/npm/cjs-invalid-name-exports/main.ts
+++ b/tests/specs/npm_tests/cjs_invalid_name_exports/cjs-invalid-name-exports/main.ts
diff --git a/tests/specs/npm_tests/cjs_local_global_decls/__test__.jsonc b/tests/specs/npm_tests/cjs_local_global_decls/__test__.jsonc
new file mode 100644
index 000000000..8bf847873
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_local_global_decls/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read cjs_local_global_decls/main.ts",
+ "output": "cjs_local_global_decls/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/cjs_local_global_decls/main.out b/tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.out
index 5e7a36c8d..5e7a36c8d 100644
--- a/tests/testdata/npm/cjs_local_global_decls/main.out
+++ b/tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.out
diff --git a/tests/testdata/npm/cjs_local_global_decls/main.ts b/tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.ts
index 04074057b..04074057b 100644
--- a/tests/testdata/npm/cjs_local_global_decls/main.ts
+++ b/tests/specs/npm_tests/cjs_local_global_decls/cjs_local_global_decls/main.ts
diff --git a/tests/specs/npm_tests/cjs_module_export_assignment/__test__.jsonc b/tests/specs/npm_tests/cjs_module_export_assignment/__test__.jsonc
new file mode 100644
index 000000000..e9be6361a
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_module_export_assignment/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet --check=all cjs_module_export_assignment/main.ts",
+ "output": "cjs_module_export_assignment/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/cjs_module_export_assignment/main.out b/tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.out
index dea185e38..dea185e38 100644
--- a/tests/testdata/npm/cjs_module_export_assignment/main.out
+++ b/tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.out
diff --git a/tests/testdata/npm/cjs_module_export_assignment/main.ts b/tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.ts
index 93d3db1c3..93d3db1c3 100644
--- a/tests/testdata/npm/cjs_module_export_assignment/main.ts
+++ b/tests/specs/npm_tests/cjs_module_export_assignment/cjs_module_export_assignment/main.ts
diff --git a/tests/specs/npm_tests/cjs_module_export_assignment_number/__test__.jsonc b/tests/specs/npm_tests/cjs_module_export_assignment_number/__test__.jsonc
new file mode 100644
index 000000000..d70f82e50
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_module_export_assignment_number/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet --check=all cjs_module_export_assignment_number/main.ts",
+ "output": "cjs_module_export_assignment_number/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/cjs_module_export_assignment_number/main.out b/tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out
index e559775cf..e559775cf 100644
--- a/tests/testdata/npm/cjs_module_export_assignment_number/main.out
+++ b/tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.out
diff --git a/tests/testdata/npm/cjs_module_export_assignment_number/main.ts b/tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.ts
index aee24bf19..aee24bf19 100644
--- a/tests/testdata/npm/cjs_module_export_assignment_number/main.ts
+++ b/tests/specs/npm_tests/cjs_module_export_assignment_number/cjs_module_export_assignment_number/main.ts
diff --git a/tests/specs/npm_tests/cjs_pkg_imports/__test__.jsonc b/tests/specs/npm_tests/cjs_pkg_imports/__test__.jsonc
new file mode 100644
index 000000000..c51f14b56
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_pkg_imports/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A cjs_pkg_imports/main.ts",
+ "output": "cjs_pkg_imports/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/cjs_pkg_imports/main.out b/tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.out
index 661146bd0..661146bd0 100644
--- a/tests/testdata/npm/cjs_pkg_imports/main.out
+++ b/tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.out
diff --git a/tests/testdata/npm/cjs_pkg_imports/main.ts b/tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.ts
index b30a3f85c..b30a3f85c 100644
--- a/tests/testdata/npm/cjs_pkg_imports/main.ts
+++ b/tests/specs/npm_tests/cjs_pkg_imports/cjs_pkg_imports/main.ts
diff --git a/tests/specs/npm_tests/cjs_reexport_collision/__test__.jsonc b/tests/specs/npm_tests/cjs_reexport_collision/__test__.jsonc
new file mode 100644
index 000000000..0b9d1e621
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_reexport_collision/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet cjs_reexport_collision/main.ts",
+ "output": "cjs_reexport_collision/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/cjs_reexport_collision/main.out b/tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.out
index ed3193f8d..ed3193f8d 100644
--- a/tests/testdata/npm/cjs_reexport_collision/main.out
+++ b/tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.out
diff --git a/tests/testdata/npm/cjs_reexport_collision/main.ts b/tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.ts
index 4bfcd89b1..4bfcd89b1 100644
--- a/tests/testdata/npm/cjs_reexport_collision/main.ts
+++ b/tests/specs/npm_tests/cjs_reexport_collision/cjs_reexport_collision/main.ts
diff --git a/tests/specs/npm_tests/cjs_require_esm/__test__.jsonc b/tests/specs/npm_tests/cjs_require_esm/__test__.jsonc
new file mode 100644
index 000000000..172f1ca65
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_require_esm/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read --quiet cjs_require_esm/main.ts",
+ "output": "cjs_require_esm/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/cjs_require_esm/main.out b/tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.out
index 4afceccc9..4afceccc9 100644
--- a/tests/testdata/npm/cjs_require_esm/main.out
+++ b/tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.out
diff --git a/tests/testdata/npm/cjs_require_esm/main.ts b/tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.ts
index 069d4b60e..069d4b60e 100644
--- a/tests/testdata/npm/cjs_require_esm/main.ts
+++ b/tests/specs/npm_tests/cjs_require_esm/cjs_require_esm/main.ts
diff --git a/tests/specs/npm_tests/cjs_require_esm_mjs/__test__.jsonc b/tests/specs/npm_tests/cjs_require_esm_mjs/__test__.jsonc
new file mode 100644
index 000000000..3a1323127
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_require_esm_mjs/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read --quiet cjs_require_esm_mjs/main.ts",
+ "output": "cjs_require_esm_mjs/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/cjs_require_esm_mjs/main.out b/tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out
index 4afceccc9..4afceccc9 100644
--- a/tests/testdata/npm/cjs_require_esm_mjs/main.out
+++ b/tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.out
diff --git a/tests/testdata/npm/cjs_require_esm_mjs/main.ts b/tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.ts
index d753c2a83..d753c2a83 100644
--- a/tests/testdata/npm/cjs_require_esm_mjs/main.ts
+++ b/tests/specs/npm_tests/cjs_require_esm_mjs/cjs_require_esm_mjs/main.ts
diff --git a/tests/specs/npm_tests/cjs_sub_path/__test__.jsonc b/tests/specs/npm_tests/cjs_sub_path/__test__.jsonc
new file mode 100644
index 000000000..dbec76a13
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_sub_path/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read cjs_sub_path/main.js",
+ "output": "cjs_sub_path/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/cjs_sub_path/main.js b/tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.js
index b71360959..b71360959 100644
--- a/tests/testdata/npm/cjs_sub_path/main.js
+++ b/tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.js
diff --git a/tests/testdata/npm/cjs_sub_path/main.out b/tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.out
index 868733775..868733775 100644
--- a/tests/testdata/npm/cjs_sub_path/main.out
+++ b/tests/specs/npm_tests/cjs_sub_path/cjs_sub_path/main.out
diff --git a/tests/specs/npm_tests/cjs_this_in_exports/__test__.jsonc b/tests/specs/npm_tests/cjs_this_in_exports/__test__.jsonc
new file mode 100644
index 000000000..251691ca8
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_this_in_exports/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --allow-read --quiet cjs_this_in_exports/main.js",
+ "output": "cjs_this_in_exports/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/cjs_this_in_exports/main.js b/tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.js
index 03aaabe05..03aaabe05 100644
--- a/tests/testdata/npm/cjs_this_in_exports/main.js
+++ b/tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.js
diff --git a/tests/testdata/npm/cjs_this_in_exports/main.out b/tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.out
index ba436bddc..9517015ae 100644
--- a/tests/testdata/npm/cjs_this_in_exports/main.out
+++ b/tests/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.out
@@ -2,4 +2,4 @@
1
error: Uncaught (in promise) TypeError: this.otherMethod is not a function
at getValue (file://[WILDCARD]/@denotest/cjs-this-in-exports/1.0.0/index.js:3:17)
- at file://[WILDCARD]/testdata/npm/cjs_this_in_exports/main.js:11:1
+ at file://[WILDCARD]/specs/npm_tests/cjs_this_in_exports/cjs_this_in_exports/main.js:11:1
diff --git a/tests/specs/npm_tests/cjs_with_deps/__test__.jsonc b/tests/specs/npm_tests/cjs_with_deps/__test__.jsonc
new file mode 100644
index 000000000..d9014f102
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_with_deps/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read --allow-env cjs_with_deps/main.js",
+ "output": "cjs_with_deps/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js
new file mode 100644
index 000000000..568726874
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.js
@@ -0,0 +1,12 @@
+import chalk from "npm:chalk@4";
+import { expect } from "npm:chai@4.3";
+
+console.log(chalk.green("chalk cjs loads"));
+
+const timeout = setTimeout(() => {}, 0);
+expect(timeout).to.be.a("number");
+clearTimeout(timeout);
+
+const interval = setInterval(() => {}, 100);
+expect(interval).to.be.a("number");
+clearInterval(interval);
diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out
new file mode 100644
index 000000000..7051c2395
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main.out
@@ -0,0 +1,33 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chai
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/assertion-error
+Download http://localhost:4260/check-error
+Download http://localhost:4260/deep-eql
+Download http://localhost:4260/get-func-name
+Download http://localhost:4260/loupe
+Download http://localhost:4260/pathval
+Download http://localhost:4260/type-detect
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz
+Download http://localhost:4260/chai/chai-4.3.6.tgz
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Download http://localhost:4260/check-error/check-error-1.0.2.tgz
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz
+Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Download http://localhost:4260/loupe/loupe-2.3.4.tgz
+Download http://localhost:4260/pathval/pathval-1.1.1.tgz
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz
+[UNORDERED_END]
+chalk cjs loads
diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info.out b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info.out
new file mode 100644
index 000000000..8e37c88eb
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info.out
@@ -0,0 +1,22 @@
+local: [WILDCARD]main.js
+type: JavaScript
+dependencies: 14 unique
+size: [WILDCARD]
+
+file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD])
+├─┬ npm:/chalk@4.1.2 ([WILDCARD])
+│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD])
+│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD])
+│ │ └── npm:/color-name@1.1.4 ([WILDCARD])
+│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD])
+│ └── npm:/has-flag@4.0.0 ([WILDCARD])
+└─┬ npm:/chai@4.3.6 ([WILDCARD])
+ ├── npm:/assertion-error@1.1.0 ([WILDCARD])
+ ├── npm:/check-error@1.0.2 ([WILDCARD])
+ ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD])
+ │ └── npm:/type-detect@4.0.8 ([WILDCARD])
+ ├── npm:/get-func-name@2.0.0 ([WILDCARD])
+ ├─┬ npm:/loupe@2.3.4 ([WILDCARD])
+ │ └── npm:/get-func-name@2.0.0 ([WILDCARD])
+ ├── npm:/pathval@1.1.1 ([WILDCARD])
+ └── npm:/type-detect@4.0.8 ([WILDCARD])
diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info_json.out b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info_json.out
new file mode 100644
index 000000000..af1ef1351
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_info_json.out
@@ -0,0 +1,148 @@
+{
+ "roots": [
+ "file://[WILDCARD]/main.js"
+ ],
+ "modules": [
+ {
+ "kind": "esm",
+ "dependencies": [
+ {
+ "specifier": "npm:chalk@4",
+ "code": {
+ "specifier": "npm:chalk@4",
+ "span": {
+ "start": {
+ "line": 0,
+ "character": 18
+ },
+ "end": {
+ "line": 0,
+ "character": 31
+ }
+ }
+ },
+ "npmPackage": "chalk@4.1.2"
+ },
+ {
+ "specifier": "npm:chai@4.3",
+ "code": {
+ "specifier": "npm:chai@4.3",
+ "span": {
+ "start": {
+ "line": 1,
+ "character": 23
+ },
+ "end": {
+ "line": 1,
+ "character": 37
+ }
+ }
+ },
+ "npmPackage": "chai@4.3.6"
+ }
+ ],
+ "local": "[WILDCARD]main.js",
+ "size": 325,
+ "mediaType": "JavaScript",
+ "specifier": "[WILDCARD]/main.js"
+ }
+ ],
+ "redirects": {
+ "npm:chai@4.3": "npm:/chai@4.3.6",
+ "npm:chalk@4": "npm:/chalk@4.1.2"
+ },
+ "version": 1,
+ "npmPackages": {
+ "ansi-styles@4.3.0": {
+ "name": "ansi-styles",
+ "version": "4.3.0",
+ "dependencies": [
+ "color-convert@2.0.1"
+ ]
+ },
+ "assertion-error@1.1.0": {
+ "name": "assertion-error",
+ "version": "1.1.0",
+ "dependencies": []
+ },
+ "chai@4.3.6": {
+ "name": "chai",
+ "version": "4.3.6",
+ "dependencies": [
+ "assertion-error@1.1.0",
+ "check-error@1.0.2",
+ "deep-eql@3.0.1",
+ "get-func-name@2.0.0",
+ "loupe@2.3.4",
+ "pathval@1.1.1",
+ "type-detect@4.0.8"
+ ]
+ },
+ "chalk@4.1.2": {
+ "name": "chalk",
+ "version": "4.1.2",
+ "dependencies": [
+ "ansi-styles@4.3.0",
+ "supports-color@7.2.0"
+ ]
+ },
+ "check-error@1.0.2": {
+ "name": "check-error",
+ "version": "1.0.2",
+ "dependencies": []
+ },
+ "color-convert@2.0.1": {
+ "name": "color-convert",
+ "version": "2.0.1",
+ "dependencies": [
+ "color-name@1.1.4"
+ ]
+ },
+ "color-name@1.1.4": {
+ "name": "color-name",
+ "version": "1.1.4",
+ "dependencies": []
+ },
+ "deep-eql@3.0.1": {
+ "name": "deep-eql",
+ "version": "3.0.1",
+ "dependencies": [
+ "type-detect@4.0.8"
+ ]
+ },
+ "get-func-name@2.0.0": {
+ "name": "get-func-name",
+ "version": "2.0.0",
+ "dependencies": []
+ },
+ "has-flag@4.0.0": {
+ "name": "has-flag",
+ "version": "4.0.0",
+ "dependencies": []
+ },
+ "loupe@2.3.4": {
+ "name": "loupe",
+ "version": "2.3.4",
+ "dependencies": [
+ "get-func-name@2.0.0"
+ ]
+ },
+ "pathval@1.1.1": {
+ "name": "pathval",
+ "version": "1.1.1",
+ "dependencies": []
+ },
+ "supports-color@7.2.0": {
+ "name": "supports-color",
+ "version": "7.2.0",
+ "dependencies": [
+ "has-flag@4.0.0"
+ ]
+ },
+ "type-detect@4.0.8": {
+ "name": "type-detect",
+ "version": "4.0.8",
+ "dependencies": []
+ }
+ }
+}
diff --git a/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_node_modules.out b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_node_modules.out
new file mode 100644
index 000000000..1ab367952
--- /dev/null
+++ b/tests/specs/npm_tests/cjs_with_deps/cjs_with_deps/main_node_modules.out
@@ -0,0 +1,47 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chai
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/assertion-error
+Download http://localhost:4260/check-error
+Download http://localhost:4260/deep-eql
+Download http://localhost:4260/get-func-name
+Download http://localhost:4260/loupe
+Download http://localhost:4260/pathval
+Download http://localhost:4260/type-detect
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Initialize ansi-styles@4.3.0
+Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz
+Initialize assertion-error@1.1.0
+Download http://localhost:4260/chai/chai-4.3.6.tgz
+Initialize chai@4.3.6
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Initialize chalk@4.1.2
+Download http://localhost:4260/check-error/check-error-1.0.2.tgz
+Initialize check-error@1.0.2
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Initialize color-convert@2.0.1
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Initialize color-name@1.1.4
+Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz
+Initialize deep-eql@3.0.1
+Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz
+Initialize get-func-name@2.0.0
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Initialize has-flag@4.0.0
+Download http://localhost:4260/loupe/loupe-2.3.4.tgz
+Initialize loupe@2.3.4
+Download http://localhost:4260/pathval/pathval-1.1.1.tgz
+Initialize pathval@1.1.1
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Initialize supports-color@7.2.0
+Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz
+Initialize type-detect@4.0.8
+[UNORDERED_END]
+chalk cjs loads
diff --git a/tests/specs/npm_tests/compare_globals/__test__.jsonc b/tests/specs/npm_tests/compare_globals/__test__.jsonc
new file mode 100644
index 000000000..d86a76dbc
--- /dev/null
+++ b/tests/specs/npm_tests/compare_globals/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read --check=all compare_globals/main.ts",
+ "output": "compare_globals/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/compare_globals/main.out b/tests/specs/npm_tests/compare_globals/compare_globals/main.out
index 234a68971..a1b0a566d 100644
--- a/tests/testdata/npm/compare_globals/main.out
+++ b/tests/specs/npm_tests/compare_globals/compare_globals/main.out
@@ -8,7 +8,7 @@ Download http://localhost:4260/@denotest/globals/1.0.0.tgz
Download http://localhost:4260/@types/node/node-22.5.4.tgz
Download http://localhost:4260/undici-types/undici-types-6.19.8.tgz
[UNORDERED_END]
-Check file:///[WILDCARD]/npm/compare_globals/main.ts
+Check file:///[WILDCARD]/compare_globals/main.ts
true
true
[]
diff --git a/tests/testdata/npm/compare_globals/main.ts b/tests/specs/npm_tests/compare_globals/compare_globals/main.ts
index 9482798d8..9482798d8 100644
--- a/tests/testdata/npm/compare_globals/main.ts
+++ b/tests/specs/npm_tests/compare_globals/compare_globals/main.ts
diff --git a/tests/specs/npm_tests/create_require/__test__.jsonc b/tests/specs/npm_tests/create_require/__test__.jsonc
new file mode 100644
index 000000000..40d9ce066
--- /dev/null
+++ b/tests/specs/npm_tests/create_require/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --reload --allow-read create_require/main.ts",
+ "output": "create_require/main.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/create_require/main.out b/tests/specs/npm_tests/create_require/create_require/main.out
index 70b0415b3..70b0415b3 100644
--- a/tests/testdata/npm/create_require/main.out
+++ b/tests/specs/npm_tests/create_require/create_require/main.out
diff --git a/tests/testdata/npm/create_require/main.ts b/tests/specs/npm_tests/create_require/create_require/main.ts
index 625c734aa..625c734aa 100644
--- a/tests/testdata/npm/create_require/main.ts
+++ b/tests/specs/npm_tests/create_require/create_require/main.ts
diff --git a/tests/specs/npm_tests/deno_cache/__test__.jsonc b/tests/specs/npm_tests/deno_cache/__test__.jsonc
new file mode 100644
index 000000000..93b204c03
--- /dev/null
+++ b/tests/specs/npm_tests/deno_cache/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "cache --reload npm:chalk npm:mkdirp",
+ "output": "deno_cache.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/deno_cache.out b/tests/specs/npm_tests/deno_cache/deno_cache.out
index d723293a8..d723293a8 100644
--- a/tests/testdata/npm/deno_cache.out
+++ b/tests/specs/npm_tests/deno_cache/deno_cache.out
diff --git a/tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc b/tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc
new file mode 100644
index 000000000..9eb8e9bfe
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_bin_cjs/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet npm:@denotest/bin/cli-cjs this is a test",
+ "output": "deno_run_cjs.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/deno_run_no_ext.out b/tests/specs/npm_tests/deno_run_bin_cjs/deno_run_cjs.out
index ffe7cbd89..ffe7cbd89 100644
--- a/tests/testdata/npm/deno_run_no_ext.out
+++ b/tests/specs/npm_tests/deno_run_bin_cjs/deno_run_cjs.out
diff --git a/tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc b/tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc
new file mode 100644
index 000000000..6ee5a326b
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet npm:@denotest/bin@0.6.0/cli-cjs.js this is a test",
+ "output": "deno_run_cjs.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/deno_run_special_chars_in_bin_name.out b/tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out
index ffe7cbd89..ffe7cbd89 100644
--- a/tests/testdata/npm/deno_run_special_chars_in_bin_name.out
+++ b/tests/specs/npm_tests/deno_run_bin_cjs_no_bin_entrypoint/deno_run_cjs.out
diff --git a/tests/specs/npm_tests/deno_run_bin_esm/__test__.jsonc b/tests/specs/npm_tests/deno_run_bin_esm/__test__.jsonc
new file mode 100644
index 000000000..fc48451bb
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_bin_esm/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet npm:@denotest/bin/cli-esm this is a test",
+ "output": "deno_run_esm.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out b/tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out
new file mode 100644
index 000000000..ffe7cbd89
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_bin_esm/deno_run_esm.out
@@ -0,0 +1,4 @@
+this
+is
+a
+test
diff --git a/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc b/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc
new file mode 100644
index 000000000..956755b30
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet npm:@denotest/bin@0.6.0/cli.mjs this is a test",
+ "output": "deno_run_esm.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out b/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out
new file mode 100644
index 000000000..ffe7cbd89
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_bin_esm_no_bin_entrypoint/deno_run_esm.out
@@ -0,0 +1,4 @@
+this
+is
+a
+test
diff --git a/tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc b/tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc
new file mode 100644
index 000000000..71877b399
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_bin_no_ext/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet npm:@denotest/bin/cli-no-ext this is a test",
+ "output": "deno_run_no_ext.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/deno_run_bin_no_ext/deno_run_no_ext.out b/tests/specs/npm_tests/deno_run_bin_no_ext/deno_run_no_ext.out
new file mode 100644
index 000000000..ffe7cbd89
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_bin_no_ext/deno_run_no_ext.out
@@ -0,0 +1,4 @@
+this
+is
+a
+test
diff --git a/tests/specs/npm_tests/deno_run_bin_special_chars/__test__.jsonc b/tests/specs/npm_tests/deno_run_bin_special_chars/__test__.jsonc
new file mode 100644
index 000000000..c3e14c0b7
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_bin_special_chars/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet npm:@denotest/special-chars-in-bin-name/\\foo\" this is a test",
+ "output": "deno_run_special_chars_in_bin_name.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out b/tests/specs/npm_tests/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out
new file mode 100644
index 000000000..ffe7cbd89
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_bin_special_chars/deno_run_special_chars_in_bin_name.out
@@ -0,0 +1,4 @@
+this
+is
+a
+test
diff --git a/tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc b/tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc
new file mode 100644
index 000000000..0015b88be
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_cowsay/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet npm:cowsay@1.5.0 Hello",
+ "output": "deno_run_cowsay.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/deno_run_cowsay/deno_run_cowsay.out b/tests/specs/npm_tests/deno_run_cowsay/deno_run_cowsay.out
new file mode 100644
index 000000000..46de82730
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_cowsay/deno_run_cowsay.out
@@ -0,0 +1,8 @@
+ _______
+< Hello >
+ -------
+ \ ^__^
+ \ (oo)\_______
+ (__)\ )\/\
+ ||----w |
+ || ||
diff --git a/tests/specs/npm_tests/deno_run_cowsay_explicit/__test__.jsonc b/tests/specs/npm_tests/deno_run_cowsay_explicit/__test__.jsonc
new file mode 100644
index 000000000..1ecce925e
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_cowsay_explicit/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet npm:cowsay@1.5.0/cowsay Hello",
+ "output": "deno_run_cowsay.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/deno_run_cowsay_explicit/deno_run_cowsay.out b/tests/specs/npm_tests/deno_run_cowsay_explicit/deno_run_cowsay.out
new file mode 100644
index 000000000..46de82730
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_cowsay_explicit/deno_run_cowsay.out
@@ -0,0 +1,8 @@
+ _______
+< Hello >
+ -------
+ \ ^__^
+ \ (oo)\_______
+ (__)\ )\/\
+ ||----w |
+ || ||
diff --git a/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/__test__.jsonc b/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/__test__.jsonc
new file mode 100644
index 000000000..8671ed1fe
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet --node-modules-dir npm:cowsay@1.5.0 Hello",
+ "output": "deno_run_cowsay.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out b/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out
new file mode 100644
index 000000000..46de82730
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_cowsay_with_node_modules_dir/deno_run_cowsay.out
@@ -0,0 +1,8 @@
+ _______
+< Hello >
+ -------
+ \ ^__^
+ \ (oo)\_______
+ (__)\ )\/\
+ ||----w |
+ || ||
diff --git a/tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc b/tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc
new file mode 100644
index 000000000..2acc84e7b
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_cowthink/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet npm:cowsay@1.5.0/cowthink Hello",
+ "output": "deno_run_cowthink.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/deno_run_cowthink/deno_run_cowthink.out b/tests/specs/npm_tests/deno_run_cowthink/deno_run_cowthink.out
new file mode 100644
index 000000000..8dd990ed6
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_cowthink/deno_run_cowthink.out
@@ -0,0 +1,8 @@
+ _______
+( Hello )
+ -------
+ o ^__^
+ o (oo)\_______
+ (__)\ )\/\
+ ||----w |
+ || ||
diff --git a/tests/specs/npm_tests/deno_run_no_bin_entrypoint/__test__.jsonc b/tests/specs/npm_tests/deno_run_no_bin_entrypoint/__test__.jsonc
new file mode 100644
index 000000000..5331ec9c4
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_no_bin_entrypoint/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run -A --quiet npm:@denotest/esm-basic",
+ "output": "deno_run_no_bin_entrypoint.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/deno_run_no_bin_entrypoint.out b/tests/specs/npm_tests/deno_run_no_bin_entrypoint/deno_run_no_bin_entrypoint.out
index 2b885ed59..2b885ed59 100644
--- a/tests/testdata/npm/deno_run_no_bin_entrypoint.out
+++ b/tests/specs/npm_tests/deno_run_no_bin_entrypoint/deno_run_no_bin_entrypoint.out
diff --git a/tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc b/tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc
new file mode 100644
index 000000000..3eaa8274c
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run -A --quiet npm:@denotest/esm-basic/non-existent.js",
+ "output": "deno_run_no_bin_entrypoint_non_existent_subpath.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/deno_run_no_bin_entrypoint_non_existent_subpath.out b/tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/deno_run_no_bin_entrypoint_non_existent_subpath.out
index 525fe4b4f..525fe4b4f 100644
--- a/tests/testdata/npm/deno_run_no_bin_entrypoint_non_existent_subpath.out
+++ b/tests/specs/npm_tests/deno_run_no_bin_entrypoint_non_existent_subpath/deno_run_no_bin_entrypoint_non_existent_subpath.out
diff --git a/tests/specs/npm_tests/deno_run_non_existent/__test__.jsonc b/tests/specs/npm_tests/deno_run_non_existent/__test__.jsonc
new file mode 100644
index 000000000..72dc01450
--- /dev/null
+++ b/tests/specs/npm_tests/deno_run_non_existent/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run npm:mkdirp@0.5.125",
+ "output": "deno_run_non_existent.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/deno_run_non_existent.out b/tests/specs/npm_tests/deno_run_non_existent/deno_run_non_existent.out
index 247e650e6..247e650e6 100644
--- a/tests/testdata/npm/deno_run_non_existent.out
+++ b/tests/specs/npm_tests/deno_run_non_existent/deno_run_non_existent.out
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/__test__.jsonc b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/__test__.jsonc
new file mode 100644
index 000000000..24587d928
--- /dev/null
+++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --quiet --no-lock --node-modules-dir=none different_nested_dep/main.js",
+ "output": "different_nested_dep/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 0
+}
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js
new file mode 100644
index 000000000..5677eb094
--- /dev/null
+++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.js
@@ -0,0 +1,5 @@
+import dep from "@denotest/different-nested-dep";
+import childDep from "@denotest/different-nested-dep-child";
+
+console.log(dep);
+console.log(childDep);
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out
new file mode 100644
index 000000000..1191247b6
--- /dev/null
+++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/main.out
@@ -0,0 +1,2 @@
+1
+2
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json
new file mode 100644
index 000000000..c20425851
--- /dev/null
+++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_false/different_nested_dep/package.json
@@ -0,0 +1,6 @@
+{
+ "dependencies": {
+ "@denotest/different-nested-dep": "1.0.0",
+ "@denotest/different-nested-dep-child": "2.0.0"
+ }
+}
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/__test__.jsonc b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/__test__.jsonc
new file mode 100644
index 000000000..0533a992b
--- /dev/null
+++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --no-lock --quiet --node-modules-dir=auto different_nested_dep/main.js",
+ "output": "different_nested_dep/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 0
+}
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js
new file mode 100644
index 000000000..5677eb094
--- /dev/null
+++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.js
@@ -0,0 +1,5 @@
+import dep from "@denotest/different-nested-dep";
+import childDep from "@denotest/different-nested-dep-child";
+
+console.log(dep);
+console.log(childDep);
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out
new file mode 100644
index 000000000..1191247b6
--- /dev/null
+++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/main.out
@@ -0,0 +1,2 @@
+1
+2
diff --git a/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json
new file mode 100644
index 000000000..c20425851
--- /dev/null
+++ b/tests/specs/npm_tests/different_nested_dep_node_modules_dir_true/different_nested_dep/package.json
@@ -0,0 +1,6 @@
+{
+ "dependencies": {
+ "@denotest/different-nested-dep": "1.0.0",
+ "@denotest/different-nested-dep-child": "2.0.0"
+ }
+}
diff --git a/tests/specs/npm_tests/directory_import_folder_index_js/__test__.jsonc b/tests/specs/npm_tests/directory_import_folder_index_js/__test__.jsonc
new file mode 100644
index 000000000..8eb6226d6
--- /dev/null
+++ b/tests/specs/npm_tests/directory_import_folder_index_js/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run directory_import/folder_index_js.ts",
+ "output": "directory_import/folder_index_js.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/directory_import/folder_index_js.out b/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.out
index a700b8fdb..a700b8fdb 100644
--- a/tests/testdata/npm/directory_import/folder_index_js.out
+++ b/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.out
diff --git a/tests/testdata/npm/directory_import/folder_index_js.ts b/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.ts
index b0d51fcd9..b0d51fcd9 100644
--- a/tests/testdata/npm/directory_import/folder_index_js.ts
+++ b/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_index_js.ts
diff --git a/tests/testdata/npm/directory_import/folder_no_index.out b/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.out
index 844419b4c..844419b4c 100644
--- a/tests/testdata/npm/directory_import/folder_no_index.out
+++ b/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.out
diff --git a/tests/testdata/npm/directory_import/folder_no_index.ts b/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.ts
index 4c5fb7ec0..4c5fb7ec0 100644
--- a/tests/testdata/npm/directory_import/folder_no_index.ts
+++ b/tests/specs/npm_tests/directory_import_folder_index_js/directory_import/folder_no_index.ts
diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/__test__.jsonc b/tests/specs/npm_tests/directory_import_folder_no_index/__test__.jsonc
new file mode 100644
index 000000000..613747998
--- /dev/null
+++ b/tests/specs/npm_tests/directory_import_folder_no_index/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run directory_import/folder_no_index.ts",
+ "output": "directory_import/folder_no_index.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.out b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.out
new file mode 100644
index 000000000..a700b8fdb
--- /dev/null
+++ b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.out
@@ -0,0 +1,7 @@
+Download http://localhost:4260/@denotest/sub-folders
+Download http://localhost:4260/@denotest/sub-folders/1.0.0.tgz
+error: Directory import [WILDCARD]folder_index_js is not supported resolving import from file:///[WILDCARD]/directory_import/folder_index_js.ts
+Did you mean to import index.js within the directory?
+
+Caused by:
+ [WILDCARD]
diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.ts b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.ts
new file mode 100644
index 000000000..b0d51fcd9
--- /dev/null
+++ b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_index_js.ts
@@ -0,0 +1,2 @@
+import test from "npm:@denotest/sub-folders/folder_index_js";
+console.log(test);
diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.out b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.out
new file mode 100644
index 000000000..844419b4c
--- /dev/null
+++ b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.out
@@ -0,0 +1,6 @@
+Download http://localhost:4260/@denotest/sub-folders
+Download http://localhost:4260/@denotest/sub-folders/1.0.0.tgz
+error: Directory import [WILDCARD]folder_no_index is not supported resolving import from file:///[WILDCARD]/folder_no_index.ts
+
+Caused by:
+ [WILDCARD]
diff --git a/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.ts b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.ts
new file mode 100644
index 000000000..4c5fb7ec0
--- /dev/null
+++ b/tests/specs/npm_tests/directory_import_folder_no_index/directory_import/folder_no_index.ts
@@ -0,0 +1,2 @@
+import test from "npm:@denotest/sub-folders/folder_no_index";
+console.log(test);
diff --git a/tests/specs/npm_tests/dual_cjs_esm/__test__.jsonc b/tests/specs/npm_tests/dual_cjs_esm/__test__.jsonc
new file mode 100644
index 000000000..5ace51cec
--- /dev/null
+++ b/tests/specs/npm_tests/dual_cjs_esm/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet dual_cjs_esm/main.ts",
+ "output": "dual_cjs_esm/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.out b/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.out
new file mode 100644
index 000000000..32e232f11
--- /dev/null
+++ b/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.out
@@ -0,0 +1,3 @@
+esm
+cjs
+cjs
diff --git a/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.ts b/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.ts
new file mode 100644
index 000000000..4f3b79667
--- /dev/null
+++ b/tests/specs/npm_tests/dual_cjs_esm/dual_cjs_esm/main.ts
@@ -0,0 +1,6 @@
+import { getKind } from "npm:@denotest/dual-cjs-esm@latest"; // test out @latest dist tag
+import * as cjs from "npm:@denotest/dual-cjs-esm@latest/cjs/main.cjs";
+
+console.log(getKind());
+console.log(cjs.getKind());
+console.log(cjs.getSubPathKind());
diff --git a/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/__test__.jsonc b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/__test__.jsonc
new file mode 100644
index 000000000..8dbee51c7
--- /dev/null
+++ b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read --quiet dynamic_import_deno_ts_from_npm/main.ts",
+ "output": "dynamic_import_deno_ts_from_npm/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/dynamic_import_deno_ts_from_npm/add.ts b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts
index 3b399665d..3b399665d 100644
--- a/tests/testdata/npm/dynamic_import_deno_ts_from_npm/add.ts
+++ b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/add.ts
diff --git a/tests/testdata/npm/dynamic_import_deno_ts_from_npm/main.out b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out
index 81d7aba8a..81d7aba8a 100644
--- a/tests/testdata/npm/dynamic_import_deno_ts_from_npm/main.out
+++ b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.out
diff --git a/tests/testdata/npm/dynamic_import_deno_ts_from_npm/main.ts b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts
index 4d5deec48..4d5deec48 100644
--- a/tests/testdata/npm/dynamic_import_deno_ts_from_npm/main.ts
+++ b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/main.ts
diff --git a/tests/testdata/npm/dynamic_import_deno_ts_from_npm/subtract.mts b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/subtract.mts
index 4bf634170..4bf634170 100644
--- a/tests/testdata/npm/dynamic_import_deno_ts_from_npm/subtract.mts
+++ b/tests/specs/npm_tests/dynamic_import_deno_ts_from_npm/dynamic_import_deno_ts_from_npm/subtract.mts
diff --git a/tests/specs/npm_tests/dynamic_import_invalid_package_name/__test__.jsonc b/tests/specs/npm_tests/dynamic_import_invalid_package_name/__test__.jsonc
new file mode 100644
index 000000000..a15cabf83
--- /dev/null
+++ b/tests/specs/npm_tests/dynamic_import_invalid_package_name/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --reload dynamic_import_invalid_package_name/main.ts",
+ "output": "dynamic_import_invalid_package_name/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/dynamic_import_invalid_package_name/main.out b/tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out
index 414d08795..414d08795 100644
--- a/tests/testdata/npm/dynamic_import_invalid_package_name/main.out
+++ b/tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.out
diff --git a/tests/testdata/npm/dynamic_import_invalid_package_name/main.ts b/tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.ts
index 368ccc282..368ccc282 100644
--- a/tests/testdata/npm/dynamic_import_invalid_package_name/main.ts
+++ b/tests/specs/npm_tests/dynamic_import_invalid_package_name/dynamic_import_invalid_package_name/main.ts
diff --git a/tests/specs/npm_tests/dynamic_import_json/__test__.jsonc b/tests/specs/npm_tests/dynamic_import_json/__test__.jsonc
new file mode 100644
index 000000000..9b4f5a212
--- /dev/null
+++ b/tests/specs/npm_tests/dynamic_import_json/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet import_json/main.js",
+ "output": "import_json/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/import_json/main.js b/tests/specs/npm_tests/dynamic_import_json/import_json/main.js
index ac6cee9a8..ac6cee9a8 100644
--- a/tests/testdata/npm/import_json/main.js
+++ b/tests/specs/npm_tests/dynamic_import_json/import_json/main.js
diff --git a/tests/testdata/npm/import_json/main.out b/tests/specs/npm_tests/dynamic_import_json/import_json/main.out
index 7db7ec4ea..7db7ec4ea 100644
--- a/tests/testdata/npm/import_json/main.out
+++ b/tests/specs/npm_tests/dynamic_import_json/import_json/main.out
diff --git a/tests/specs/npm_tests/dynamic_import_reload_same_package/__test__.jsonc b/tests/specs/npm_tests/dynamic_import_reload_same_package/__test__.jsonc
new file mode 100644
index 000000000..d255b9a87
--- /dev/null
+++ b/tests/specs/npm_tests/dynamic_import_reload_same_package/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --reload dynamic_import_reload_same_package/main.ts",
+ "output": "dynamic_import_reload_same_package/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/dynamic_import_reload_same_package/main.out b/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out
index b2f99b465..b2f99b465 100644
--- a/tests/testdata/npm/dynamic_import_reload_same_package/main.out
+++ b/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.out
diff --git a/tests/testdata/npm/dynamic_import_reload_same_package/main.ts b/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts
index 7c7ee7d55..7c7ee7d55 100644
--- a/tests/testdata/npm/dynamic_import_reload_same_package/main.ts
+++ b/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/main.ts
diff --git a/tests/testdata/npm/dynamic_import_reload_same_package/other.ts b/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/other.ts
index 28e3da14f..28e3da14f 100644
--- a/tests/testdata/npm/dynamic_import_reload_same_package/other.ts
+++ b/tests/specs/npm_tests/dynamic_import_reload_same_package/dynamic_import_reload_same_package/other.ts
diff --git a/tests/specs/npm_tests/env_var_re_export_dev/__test__.jsonc b/tests/specs/npm_tests/env_var_re_export_dev/__test__.jsonc
new file mode 100644
index 000000000..e65ae0308
--- /dev/null
+++ b/tests/specs/npm_tests/env_var_re_export_dev/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read --allow-env --quiet env_var_re_export/main.js",
+ "output": "dev\n",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/env_var_re_export/main.js b/tests/specs/npm_tests/env_var_re_export_dev/env_var_re_export/main.js
index ed91487a0..ed91487a0 100644
--- a/tests/testdata/npm/env_var_re_export/main.js
+++ b/tests/specs/npm_tests/env_var_re_export_dev/env_var_re_export/main.js
diff --git a/tests/specs/npm_tests/env_var_re_export_prod/__test__.jsonc b/tests/specs/npm_tests/env_var_re_export_prod/__test__.jsonc
new file mode 100644
index 000000000..6c206ba3e
--- /dev/null
+++ b/tests/specs/npm_tests/env_var_re_export_prod/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --allow-read --allow-env --quiet env_var_re_export/main.js",
+ "output": "prod\n",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/",
+ "NODE_ENV": "production"
+ }
+}
diff --git a/tests/specs/npm_tests/env_var_re_export_prod/env_var_re_export/main.js b/tests/specs/npm_tests/env_var_re_export_prod/env_var_re_export/main.js
new file mode 100644
index 000000000..ed91487a0
--- /dev/null
+++ b/tests/specs/npm_tests/env_var_re_export_prod/env_var_re_export/main.js
@@ -0,0 +1,3 @@
+import { getEnv } from "npm:@denotest/env-var-re-export";
+
+console.log(getEnv());
diff --git a/tests/specs/npm_tests/error_version_after_subpath/__test__.jsonc b/tests/specs/npm_tests/error_version_after_subpath/__test__.jsonc
new file mode 100644
index 000000000..157e238d8
--- /dev/null
+++ b/tests/specs/npm_tests/error_version_after_subpath/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run -A --quiet error_version_after_subpath/main.js",
+ "output": "error_version_after_subpath/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/error_version_after_subpath/main.js b/tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.js
index 77c7a017c..77c7a017c 100644
--- a/tests/testdata/npm/error_version_after_subpath/main.js
+++ b/tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.js
diff --git a/tests/testdata/npm/error_version_after_subpath/main.out b/tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.out
index 0cdd1b6da..4e5f03e23 100644
--- a/tests/testdata/npm/error_version_after_subpath/main.out
+++ b/tests/specs/npm_tests/error_version_after_subpath/error_version_after_subpath/main.out
@@ -1,2 +1,2 @@
error: Invalid package specifier 'npm:react-dom/server@18.2.0'. Did you mean to write 'npm:react-dom@18.2.0/server'?
- at [WILDCARD]/npm/error_version_after_subpath/main.js:1:8
+ at [WILDCARD]/error_version_after_subpath/main.js:1:8
diff --git a/tests/specs/npm_tests/import_json/__test__.jsonc b/tests/specs/npm_tests/import_json/__test__.jsonc
new file mode 100644
index 000000000..9b4f5a212
--- /dev/null
+++ b/tests/specs/npm_tests/import_json/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet import_json/main.js",
+ "output": "import_json/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/import_json/import_json/main.js b/tests/specs/npm_tests/import_json/import_json/main.js
new file mode 100644
index 000000000..ac6cee9a8
--- /dev/null
+++ b/tests/specs/npm_tests/import_json/import_json/main.js
@@ -0,0 +1,4 @@
+import json from "npm:@denotest/binary-package@1/package.json" with {
+ type: "json",
+};
+console.log(json);
diff --git a/tests/specs/npm_tests/import_json/import_json/main.out b/tests/specs/npm_tests/import_json/import_json/main.out
new file mode 100644
index 000000000..7db7ec4ea
--- /dev/null
+++ b/tests/specs/npm_tests/import_json/import_json/main.out
@@ -0,0 +1,10 @@
+{
+ name: "@denotest/binary-package",
+ version: "1.0.0",
+ main: "index.js",
+ optionalDependencies: {
+ "@denotest/binary-package-linux": "1.0.0",
+ "@denotest/binary-package-mac": "1.0.0",
+ "@denotest/binary-package-windows": "1.0.0"
+ }
+}
diff --git a/tests/specs/npm_tests/import_map/__test__.jsonc b/tests/specs/npm_tests/import_map/__test__.jsonc
new file mode 100644
index 000000000..822acbbe4
--- /dev/null
+++ b/tests/specs/npm_tests/import_map/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read --allow-env --import-map import_map/import_map.json import_map/main.js",
+ "output": "import_map/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/import_map/import_map.json b/tests/specs/npm_tests/import_map/import_map/import_map.json
index 1c3baacd1..1c3baacd1 100644
--- a/tests/testdata/npm/import_map/import_map.json
+++ b/tests/specs/npm_tests/import_map/import_map/import_map.json
diff --git a/tests/testdata/npm/import_map/main.js b/tests/specs/npm_tests/import_map/import_map/main.js
index e354b7e92..e354b7e92 100644
--- a/tests/testdata/npm/import_map/main.js
+++ b/tests/specs/npm_tests/import_map/import_map/main.js
diff --git a/tests/testdata/npm/import_map/main.out b/tests/specs/npm_tests/import_map/import_map/main.out
index 05f313d4e..05f313d4e 100644
--- a/tests/testdata/npm/import_map/main.out
+++ b/tests/specs/npm_tests/import_map/import_map/main.out
diff --git a/tests/specs/npm_tests/imports_package_json/__test__.jsonc b/tests/specs/npm_tests/imports_package_json/__test__.jsonc
new file mode 100644
index 000000000..e11b92132
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --no-lock --node-modules-dir=none imports_package_json/main.js",
+ "output": "imports_package_json/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/imports_package_json/import_not_defined.js b/tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.js
index dc4d2df16..dc4d2df16 100644
--- a/tests/testdata/npm/imports_package_json/import_not_defined.js
+++ b/tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.js
diff --git a/tests/testdata/npm/imports_package_json/import_not_defined.out b/tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.out
index 70d1145a3..70d1145a3 100644
--- a/tests/testdata/npm/imports_package_json/import_not_defined.out
+++ b/tests/specs/npm_tests/imports_package_json/imports_package_json/import_not_defined.out
diff --git a/tests/testdata/npm/imports_package_json/main.js b/tests/specs/npm_tests/imports_package_json/imports_package_json/main.js
index 53090dd94..53090dd94 100644
--- a/tests/testdata/npm/imports_package_json/main.js
+++ b/tests/specs/npm_tests/imports_package_json/imports_package_json/main.js
diff --git a/tests/testdata/npm/imports_package_json/main.out b/tests/specs/npm_tests/imports_package_json/imports_package_json/main.out
index 979e35576..979e35576 100644
--- a/tests/testdata/npm/imports_package_json/main.out
+++ b/tests/specs/npm_tests/imports_package_json/imports_package_json/main.out
diff --git a/tests/testdata/npm/imports_package_json/package.json b/tests/specs/npm_tests/imports_package_json/imports_package_json/package.json
index cb6a08d1a..cb6a08d1a 100644
--- a/tests/testdata/npm/imports_package_json/package.json
+++ b/tests/specs/npm_tests/imports_package_json/imports_package_json/package.json
diff --git a/tests/testdata/npm/imports_package_json/sub_path_import_not_defined.js b/tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.js
index f1097aa06..f1097aa06 100644
--- a/tests/testdata/npm/imports_package_json/sub_path_import_not_defined.js
+++ b/tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.js
diff --git a/tests/testdata/npm/imports_package_json/sub_path_import_not_defined.out b/tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.out
index 7c803f2bf..7c803f2bf 100644
--- a/tests/testdata/npm/imports_package_json/sub_path_import_not_defined.out
+++ b/tests/specs/npm_tests/imports_package_json/imports_package_json/sub_path_import_not_defined.out
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/__test__.jsonc b/tests/specs/npm_tests/imports_package_json_import_not_defined/__test__.jsonc
new file mode 100644
index 000000000..0f094838c
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --no-lock --node-modules-dir=none imports_package_json/import_not_defined.js",
+ "output": "imports_package_json/import_not_defined.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js
new file mode 100644
index 000000000..dc4d2df16
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.js
@@ -0,0 +1,3 @@
+import data from "@denotest/imports-package-json/import-not-defined";
+
+console.log(data);
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out
new file mode 100644
index 000000000..70d1145a3
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/import_not_defined.out
@@ -0,0 +1,3 @@
+Download http://localhost:4260/@denotest/imports-package-json
+Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz
+error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#not-defined" is not defined in package [WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js'
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.js b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.js
new file mode 100644
index 000000000..53090dd94
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.js
@@ -0,0 +1,7 @@
+import data from "@denotest/imports-package-json";
+
+console.log(data.hi);
+console.log(data.bye);
+console.log(typeof data.fs.readFile);
+console.log(typeof data.path.join);
+console.log(typeof data.fs2.writeFile);
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.out b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.out
new file mode 100644
index 000000000..979e35576
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/main.out
@@ -0,0 +1,7 @@
+Download http://localhost:4260/@denotest/imports-package-json
+Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz
+hi
+bye
+function
+function
+function
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/package.json b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/package.json
new file mode 100644
index 000000000..cb6a08d1a
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/package.json
@@ -0,0 +1,6 @@
+{
+ "name": "my-test",
+ "dependencies": {
+ "@denotest/imports-package-json": "1.0.0"
+ }
+}
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js
new file mode 100644
index 000000000..f1097aa06
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.js
@@ -0,0 +1,3 @@
+import data from "@denotest/imports-package-json/sub-path-import-not-defined";
+
+console.log(data);
diff --git a/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out
new file mode 100644
index 000000000..7c803f2bf
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_import_not_defined/imports_package_json/sub_path_import_not_defined.out
@@ -0,0 +1,3 @@
+Download http://localhost:4260/@denotest/imports-package-json
+Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz
+error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#hi" is not defined in package [WILDCARD]sub_path[WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js'
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/__test__.jsonc b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/__test__.jsonc
new file mode 100644
index 000000000..f862dc58e
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --no-lock --node-modules-dir=none imports_package_json/sub_path_import_not_defined.js",
+ "output": "imports_package_json/sub_path_import_not_defined.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js
new file mode 100644
index 000000000..dc4d2df16
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.js
@@ -0,0 +1,3 @@
+import data from "@denotest/imports-package-json/import-not-defined";
+
+console.log(data);
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out
new file mode 100644
index 000000000..70d1145a3
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/import_not_defined.out
@@ -0,0 +1,3 @@
+Download http://localhost:4260/@denotest/imports-package-json
+Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz
+error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#not-defined" is not defined in package [WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js'
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js
new file mode 100644
index 000000000..53090dd94
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.js
@@ -0,0 +1,7 @@
+import data from "@denotest/imports-package-json";
+
+console.log(data.hi);
+console.log(data.bye);
+console.log(typeof data.fs.readFile);
+console.log(typeof data.path.join);
+console.log(typeof data.fs2.writeFile);
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out
new file mode 100644
index 000000000..979e35576
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/main.out
@@ -0,0 +1,7 @@
+Download http://localhost:4260/@denotest/imports-package-json
+Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz
+hi
+bye
+function
+function
+function
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json
new file mode 100644
index 000000000..cb6a08d1a
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/package.json
@@ -0,0 +1,6 @@
+{
+ "name": "my-test",
+ "dependencies": {
+ "@denotest/imports-package-json": "1.0.0"
+ }
+}
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js
new file mode 100644
index 000000000..f1097aa06
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.js
@@ -0,0 +1,3 @@
+import data from "@denotest/imports-package-json/sub-path-import-not-defined";
+
+console.log(data);
diff --git a/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out
new file mode 100644
index 000000000..7c803f2bf
--- /dev/null
+++ b/tests/specs/npm_tests/imports_package_json_sub_path_import_not_defined/imports_package_json/sub_path_import_not_defined.out
@@ -0,0 +1,3 @@
+Download http://localhost:4260/@denotest/imports-package-json
+Download http://localhost:4260/@denotest/imports-package-json/1.0.0.tgz
+error: [ERR_PACKAGE_IMPORT_NOT_DEFINED] Package import specifier "#hi" is not defined in package [WILDCARD]sub_path[WILDCARD]package.json imported from '[WILDCARD]import_not_defined.js'
diff --git a/tests/specs/npm_tests/info_chalk_display/__test__.jsonc b/tests/specs/npm_tests/info_chalk_display/__test__.jsonc
new file mode 100644
index 000000000..998aa6f1d
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_display/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "info --quiet cjs_with_deps/main.js",
+ "output": "cjs_with_deps/main_info.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.js b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.js
new file mode 100644
index 000000000..568726874
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.js
@@ -0,0 +1,12 @@
+import chalk from "npm:chalk@4";
+import { expect } from "npm:chai@4.3";
+
+console.log(chalk.green("chalk cjs loads"));
+
+const timeout = setTimeout(() => {}, 0);
+expect(timeout).to.be.a("number");
+clearTimeout(timeout);
+
+const interval = setInterval(() => {}, 100);
+expect(interval).to.be.a("number");
+clearInterval(interval);
diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.out b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.out
new file mode 100644
index 000000000..7051c2395
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main.out
@@ -0,0 +1,33 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chai
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/assertion-error
+Download http://localhost:4260/check-error
+Download http://localhost:4260/deep-eql
+Download http://localhost:4260/get-func-name
+Download http://localhost:4260/loupe
+Download http://localhost:4260/pathval
+Download http://localhost:4260/type-detect
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz
+Download http://localhost:4260/chai/chai-4.3.6.tgz
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Download http://localhost:4260/check-error/check-error-1.0.2.tgz
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz
+Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Download http://localhost:4260/loupe/loupe-2.3.4.tgz
+Download http://localhost:4260/pathval/pathval-1.1.1.tgz
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz
+[UNORDERED_END]
+chalk cjs loads
diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info.out b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info.out
new file mode 100644
index 000000000..8e37c88eb
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info.out
@@ -0,0 +1,22 @@
+local: [WILDCARD]main.js
+type: JavaScript
+dependencies: 14 unique
+size: [WILDCARD]
+
+file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD])
+├─┬ npm:/chalk@4.1.2 ([WILDCARD])
+│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD])
+│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD])
+│ │ └── npm:/color-name@1.1.4 ([WILDCARD])
+│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD])
+│ └── npm:/has-flag@4.0.0 ([WILDCARD])
+└─┬ npm:/chai@4.3.6 ([WILDCARD])
+ ├── npm:/assertion-error@1.1.0 ([WILDCARD])
+ ├── npm:/check-error@1.0.2 ([WILDCARD])
+ ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD])
+ │ └── npm:/type-detect@4.0.8 ([WILDCARD])
+ ├── npm:/get-func-name@2.0.0 ([WILDCARD])
+ ├─┬ npm:/loupe@2.3.4 ([WILDCARD])
+ │ └── npm:/get-func-name@2.0.0 ([WILDCARD])
+ ├── npm:/pathval@1.1.1 ([WILDCARD])
+ └── npm:/type-detect@4.0.8 ([WILDCARD])
diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info_json.out b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info_json.out
new file mode 100644
index 000000000..af1ef1351
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_info_json.out
@@ -0,0 +1,148 @@
+{
+ "roots": [
+ "file://[WILDCARD]/main.js"
+ ],
+ "modules": [
+ {
+ "kind": "esm",
+ "dependencies": [
+ {
+ "specifier": "npm:chalk@4",
+ "code": {
+ "specifier": "npm:chalk@4",
+ "span": {
+ "start": {
+ "line": 0,
+ "character": 18
+ },
+ "end": {
+ "line": 0,
+ "character": 31
+ }
+ }
+ },
+ "npmPackage": "chalk@4.1.2"
+ },
+ {
+ "specifier": "npm:chai@4.3",
+ "code": {
+ "specifier": "npm:chai@4.3",
+ "span": {
+ "start": {
+ "line": 1,
+ "character": 23
+ },
+ "end": {
+ "line": 1,
+ "character": 37
+ }
+ }
+ },
+ "npmPackage": "chai@4.3.6"
+ }
+ ],
+ "local": "[WILDCARD]main.js",
+ "size": 325,
+ "mediaType": "JavaScript",
+ "specifier": "[WILDCARD]/main.js"
+ }
+ ],
+ "redirects": {
+ "npm:chai@4.3": "npm:/chai@4.3.6",
+ "npm:chalk@4": "npm:/chalk@4.1.2"
+ },
+ "version": 1,
+ "npmPackages": {
+ "ansi-styles@4.3.0": {
+ "name": "ansi-styles",
+ "version": "4.3.0",
+ "dependencies": [
+ "color-convert@2.0.1"
+ ]
+ },
+ "assertion-error@1.1.0": {
+ "name": "assertion-error",
+ "version": "1.1.0",
+ "dependencies": []
+ },
+ "chai@4.3.6": {
+ "name": "chai",
+ "version": "4.3.6",
+ "dependencies": [
+ "assertion-error@1.1.0",
+ "check-error@1.0.2",
+ "deep-eql@3.0.1",
+ "get-func-name@2.0.0",
+ "loupe@2.3.4",
+ "pathval@1.1.1",
+ "type-detect@4.0.8"
+ ]
+ },
+ "chalk@4.1.2": {
+ "name": "chalk",
+ "version": "4.1.2",
+ "dependencies": [
+ "ansi-styles@4.3.0",
+ "supports-color@7.2.0"
+ ]
+ },
+ "check-error@1.0.2": {
+ "name": "check-error",
+ "version": "1.0.2",
+ "dependencies": []
+ },
+ "color-convert@2.0.1": {
+ "name": "color-convert",
+ "version": "2.0.1",
+ "dependencies": [
+ "color-name@1.1.4"
+ ]
+ },
+ "color-name@1.1.4": {
+ "name": "color-name",
+ "version": "1.1.4",
+ "dependencies": []
+ },
+ "deep-eql@3.0.1": {
+ "name": "deep-eql",
+ "version": "3.0.1",
+ "dependencies": [
+ "type-detect@4.0.8"
+ ]
+ },
+ "get-func-name@2.0.0": {
+ "name": "get-func-name",
+ "version": "2.0.0",
+ "dependencies": []
+ },
+ "has-flag@4.0.0": {
+ "name": "has-flag",
+ "version": "4.0.0",
+ "dependencies": []
+ },
+ "loupe@2.3.4": {
+ "name": "loupe",
+ "version": "2.3.4",
+ "dependencies": [
+ "get-func-name@2.0.0"
+ ]
+ },
+ "pathval@1.1.1": {
+ "name": "pathval",
+ "version": "1.1.1",
+ "dependencies": []
+ },
+ "supports-color@7.2.0": {
+ "name": "supports-color",
+ "version": "7.2.0",
+ "dependencies": [
+ "has-flag@4.0.0"
+ ]
+ },
+ "type-detect@4.0.8": {
+ "name": "type-detect",
+ "version": "4.0.8",
+ "dependencies": []
+ }
+ }
+}
diff --git a/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_node_modules.out b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_node_modules.out
new file mode 100644
index 000000000..1ab367952
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_display/cjs_with_deps/main_node_modules.out
@@ -0,0 +1,47 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chai
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/assertion-error
+Download http://localhost:4260/check-error
+Download http://localhost:4260/deep-eql
+Download http://localhost:4260/get-func-name
+Download http://localhost:4260/loupe
+Download http://localhost:4260/pathval
+Download http://localhost:4260/type-detect
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Initialize ansi-styles@4.3.0
+Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz
+Initialize assertion-error@1.1.0
+Download http://localhost:4260/chai/chai-4.3.6.tgz
+Initialize chai@4.3.6
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Initialize chalk@4.1.2
+Download http://localhost:4260/check-error/check-error-1.0.2.tgz
+Initialize check-error@1.0.2
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Initialize color-convert@2.0.1
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Initialize color-name@1.1.4
+Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz
+Initialize deep-eql@3.0.1
+Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz
+Initialize get-func-name@2.0.0
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Initialize has-flag@4.0.0
+Download http://localhost:4260/loupe/loupe-2.3.4.tgz
+Initialize loupe@2.3.4
+Download http://localhost:4260/pathval/pathval-1.1.1.tgz
+Initialize pathval@1.1.1
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Initialize supports-color@7.2.0
+Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz
+Initialize type-detect@4.0.8
+[UNORDERED_END]
+chalk cjs loads
diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/__test__.jsonc b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/__test__.jsonc
new file mode 100644
index 000000000..5dd35f5a4
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "info --quiet --node-modules-dir cjs_with_deps/main.js",
+ "output": "cjs_with_deps/main_info.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.js b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.js
new file mode 100644
index 000000000..568726874
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.js
@@ -0,0 +1,12 @@
+import chalk from "npm:chalk@4";
+import { expect } from "npm:chai@4.3";
+
+console.log(chalk.green("chalk cjs loads"));
+
+const timeout = setTimeout(() => {}, 0);
+expect(timeout).to.be.a("number");
+clearTimeout(timeout);
+
+const interval = setInterval(() => {}, 100);
+expect(interval).to.be.a("number");
+clearInterval(interval);
diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.out b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.out
new file mode 100644
index 000000000..7051c2395
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main.out
@@ -0,0 +1,33 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chai
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/assertion-error
+Download http://localhost:4260/check-error
+Download http://localhost:4260/deep-eql
+Download http://localhost:4260/get-func-name
+Download http://localhost:4260/loupe
+Download http://localhost:4260/pathval
+Download http://localhost:4260/type-detect
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz
+Download http://localhost:4260/chai/chai-4.3.6.tgz
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Download http://localhost:4260/check-error/check-error-1.0.2.tgz
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz
+Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Download http://localhost:4260/loupe/loupe-2.3.4.tgz
+Download http://localhost:4260/pathval/pathval-1.1.1.tgz
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz
+[UNORDERED_END]
+chalk cjs loads
diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out
new file mode 100644
index 000000000..8e37c88eb
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info.out
@@ -0,0 +1,22 @@
+local: [WILDCARD]main.js
+type: JavaScript
+dependencies: 14 unique
+size: [WILDCARD]
+
+file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD])
+├─┬ npm:/chalk@4.1.2 ([WILDCARD])
+│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD])
+│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD])
+│ │ └── npm:/color-name@1.1.4 ([WILDCARD])
+│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD])
+│ └── npm:/has-flag@4.0.0 ([WILDCARD])
+└─┬ npm:/chai@4.3.6 ([WILDCARD])
+ ├── npm:/assertion-error@1.1.0 ([WILDCARD])
+ ├── npm:/check-error@1.0.2 ([WILDCARD])
+ ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD])
+ │ └── npm:/type-detect@4.0.8 ([WILDCARD])
+ ├── npm:/get-func-name@2.0.0 ([WILDCARD])
+ ├─┬ npm:/loupe@2.3.4 ([WILDCARD])
+ │ └── npm:/get-func-name@2.0.0 ([WILDCARD])
+ ├── npm:/pathval@1.1.1 ([WILDCARD])
+ └── npm:/type-detect@4.0.8 ([WILDCARD])
diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out
new file mode 100644
index 000000000..af1ef1351
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_info_json.out
@@ -0,0 +1,148 @@
+{
+ "roots": [
+ "file://[WILDCARD]/main.js"
+ ],
+ "modules": [
+ {
+ "kind": "esm",
+ "dependencies": [
+ {
+ "specifier": "npm:chalk@4",
+ "code": {
+ "specifier": "npm:chalk@4",
+ "span": {
+ "start": {
+ "line": 0,
+ "character": 18
+ },
+ "end": {
+ "line": 0,
+ "character": 31
+ }
+ }
+ },
+ "npmPackage": "chalk@4.1.2"
+ },
+ {
+ "specifier": "npm:chai@4.3",
+ "code": {
+ "specifier": "npm:chai@4.3",
+ "span": {
+ "start": {
+ "line": 1,
+ "character": 23
+ },
+ "end": {
+ "line": 1,
+ "character": 37
+ }
+ }
+ },
+ "npmPackage": "chai@4.3.6"
+ }
+ ],
+ "local": "[WILDCARD]main.js",
+ "size": 325,
+ "mediaType": "JavaScript",
+ "specifier": "[WILDCARD]/main.js"
+ }
+ ],
+ "redirects": {
+ "npm:chai@4.3": "npm:/chai@4.3.6",
+ "npm:chalk@4": "npm:/chalk@4.1.2"
+ },
+ "version": 1,
+ "npmPackages": {
+ "ansi-styles@4.3.0": {
+ "name": "ansi-styles",
+ "version": "4.3.0",
+ "dependencies": [
+ "color-convert@2.0.1"
+ ]
+ },
+ "assertion-error@1.1.0": {
+ "name": "assertion-error",
+ "version": "1.1.0",
+ "dependencies": []
+ },
+ "chai@4.3.6": {
+ "name": "chai",
+ "version": "4.3.6",
+ "dependencies": [
+ "assertion-error@1.1.0",
+ "check-error@1.0.2",
+ "deep-eql@3.0.1",
+ "get-func-name@2.0.0",
+ "loupe@2.3.4",
+ "pathval@1.1.1",
+ "type-detect@4.0.8"
+ ]
+ },
+ "chalk@4.1.2": {
+ "name": "chalk",
+ "version": "4.1.2",
+ "dependencies": [
+ "ansi-styles@4.3.0",
+ "supports-color@7.2.0"
+ ]
+ },
+ "check-error@1.0.2": {
+ "name": "check-error",
+ "version": "1.0.2",
+ "dependencies": []
+ },
+ "color-convert@2.0.1": {
+ "name": "color-convert",
+ "version": "2.0.1",
+ "dependencies": [
+ "color-name@1.1.4"
+ ]
+ },
+ "color-name@1.1.4": {
+ "name": "color-name",
+ "version": "1.1.4",
+ "dependencies": []
+ },
+ "deep-eql@3.0.1": {
+ "name": "deep-eql",
+ "version": "3.0.1",
+ "dependencies": [
+ "type-detect@4.0.8"
+ ]
+ },
+ "get-func-name@2.0.0": {
+ "name": "get-func-name",
+ "version": "2.0.0",
+ "dependencies": []
+ },
+ "has-flag@4.0.0": {
+ "name": "has-flag",
+ "version": "4.0.0",
+ "dependencies": []
+ },
+ "loupe@2.3.4": {
+ "name": "loupe",
+ "version": "2.3.4",
+ "dependencies": [
+ "get-func-name@2.0.0"
+ ]
+ },
+ "pathval@1.1.1": {
+ "name": "pathval",
+ "version": "1.1.1",
+ "dependencies": []
+ },
+ "supports-color@7.2.0": {
+ "name": "supports-color",
+ "version": "7.2.0",
+ "dependencies": [
+ "has-flag@4.0.0"
+ ]
+ },
+ "type-detect@4.0.8": {
+ "name": "type-detect",
+ "version": "4.0.8",
+ "dependencies": []
+ }
+ }
+}
diff --git a/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out
new file mode 100644
index 000000000..1ab367952
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_display_node_modules_dir/cjs_with_deps/main_node_modules.out
@@ -0,0 +1,47 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chai
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/assertion-error
+Download http://localhost:4260/check-error
+Download http://localhost:4260/deep-eql
+Download http://localhost:4260/get-func-name
+Download http://localhost:4260/loupe
+Download http://localhost:4260/pathval
+Download http://localhost:4260/type-detect
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Initialize ansi-styles@4.3.0
+Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz
+Initialize assertion-error@1.1.0
+Download http://localhost:4260/chai/chai-4.3.6.tgz
+Initialize chai@4.3.6
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Initialize chalk@4.1.2
+Download http://localhost:4260/check-error/check-error-1.0.2.tgz
+Initialize check-error@1.0.2
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Initialize color-convert@2.0.1
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Initialize color-name@1.1.4
+Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz
+Initialize deep-eql@3.0.1
+Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz
+Initialize get-func-name@2.0.0
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Initialize has-flag@4.0.0
+Download http://localhost:4260/loupe/loupe-2.3.4.tgz
+Initialize loupe@2.3.4
+Download http://localhost:4260/pathval/pathval-1.1.1.tgz
+Initialize pathval@1.1.1
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Initialize supports-color@7.2.0
+Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz
+Initialize type-detect@4.0.8
+[UNORDERED_END]
+chalk cjs loads
diff --git a/tests/specs/npm_tests/info_chalk_json/__test__.jsonc b/tests/specs/npm_tests/info_chalk_json/__test__.jsonc
new file mode 100644
index 000000000..12c8b9b61
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_json/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "info --quiet --json cjs_with_deps/main.js",
+ "output": "cjs_with_deps/main_info_json.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.js b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.js
new file mode 100644
index 000000000..568726874
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.js
@@ -0,0 +1,12 @@
+import chalk from "npm:chalk@4";
+import { expect } from "npm:chai@4.3";
+
+console.log(chalk.green("chalk cjs loads"));
+
+const timeout = setTimeout(() => {}, 0);
+expect(timeout).to.be.a("number");
+clearTimeout(timeout);
+
+const interval = setInterval(() => {}, 100);
+expect(interval).to.be.a("number");
+clearInterval(interval);
diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.out b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.out
new file mode 100644
index 000000000..7051c2395
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main.out
@@ -0,0 +1,33 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chai
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/assertion-error
+Download http://localhost:4260/check-error
+Download http://localhost:4260/deep-eql
+Download http://localhost:4260/get-func-name
+Download http://localhost:4260/loupe
+Download http://localhost:4260/pathval
+Download http://localhost:4260/type-detect
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz
+Download http://localhost:4260/chai/chai-4.3.6.tgz
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Download http://localhost:4260/check-error/check-error-1.0.2.tgz
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz
+Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Download http://localhost:4260/loupe/loupe-2.3.4.tgz
+Download http://localhost:4260/pathval/pathval-1.1.1.tgz
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz
+[UNORDERED_END]
+chalk cjs loads
diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info.out b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info.out
new file mode 100644
index 000000000..8e37c88eb
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info.out
@@ -0,0 +1,22 @@
+local: [WILDCARD]main.js
+type: JavaScript
+dependencies: 14 unique
+size: [WILDCARD]
+
+file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD])
+├─┬ npm:/chalk@4.1.2 ([WILDCARD])
+│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD])
+│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD])
+│ │ └── npm:/color-name@1.1.4 ([WILDCARD])
+│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD])
+│ └── npm:/has-flag@4.0.0 ([WILDCARD])
+└─┬ npm:/chai@4.3.6 ([WILDCARD])
+ ├── npm:/assertion-error@1.1.0 ([WILDCARD])
+ ├── npm:/check-error@1.0.2 ([WILDCARD])
+ ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD])
+ │ └── npm:/type-detect@4.0.8 ([WILDCARD])
+ ├── npm:/get-func-name@2.0.0 ([WILDCARD])
+ ├─┬ npm:/loupe@2.3.4 ([WILDCARD])
+ │ └── npm:/get-func-name@2.0.0 ([WILDCARD])
+ ├── npm:/pathval@1.1.1 ([WILDCARD])
+ └── npm:/type-detect@4.0.8 ([WILDCARD])
diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info_json.out b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info_json.out
new file mode 100644
index 000000000..af1ef1351
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_info_json.out
@@ -0,0 +1,148 @@
+{
+ "roots": [
+ "file://[WILDCARD]/main.js"
+ ],
+ "modules": [
+ {
+ "kind": "esm",
+ "dependencies": [
+ {
+ "specifier": "npm:chalk@4",
+ "code": {
+ "specifier": "npm:chalk@4",
+ "span": {
+ "start": {
+ "line": 0,
+ "character": 18
+ },
+ "end": {
+ "line": 0,
+ "character": 31
+ }
+ }
+ },
+ "npmPackage": "chalk@4.1.2"
+ },
+ {
+ "specifier": "npm:chai@4.3",
+ "code": {
+ "specifier": "npm:chai@4.3",
+ "span": {
+ "start": {
+ "line": 1,
+ "character": 23
+ },
+ "end": {
+ "line": 1,
+ "character": 37
+ }
+ }
+ },
+ "npmPackage": "chai@4.3.6"
+ }
+ ],
+ "local": "[WILDCARD]main.js",
+ "size": 325,
+ "mediaType": "JavaScript",
+ "specifier": "[WILDCARD]/main.js"
+ }
+ ],
+ "redirects": {
+ "npm:chai@4.3": "npm:/chai@4.3.6",
+ "npm:chalk@4": "npm:/chalk@4.1.2"
+ },
+ "version": 1,
+ "npmPackages": {
+ "ansi-styles@4.3.0": {
+ "name": "ansi-styles",
+ "version": "4.3.0",
+ "dependencies": [
+ "color-convert@2.0.1"
+ ]
+ },
+ "assertion-error@1.1.0": {
+ "name": "assertion-error",
+ "version": "1.1.0",
+ "dependencies": []
+ },
+ "chai@4.3.6": {
+ "name": "chai",
+ "version": "4.3.6",
+ "dependencies": [
+ "assertion-error@1.1.0",
+ "check-error@1.0.2",
+ "deep-eql@3.0.1",
+ "get-func-name@2.0.0",
+ "loupe@2.3.4",
+ "pathval@1.1.1",
+ "type-detect@4.0.8"
+ ]
+ },
+ "chalk@4.1.2": {
+ "name": "chalk",
+ "version": "4.1.2",
+ "dependencies": [
+ "ansi-styles@4.3.0",
+ "supports-color@7.2.0"
+ ]
+ },
+ "check-error@1.0.2": {
+ "name": "check-error",
+ "version": "1.0.2",
+ "dependencies": []
+ },
+ "color-convert@2.0.1": {
+ "name": "color-convert",
+ "version": "2.0.1",
+ "dependencies": [
+ "color-name@1.1.4"
+ ]
+ },
+ "color-name@1.1.4": {
+ "name": "color-name",
+ "version": "1.1.4",
+ "dependencies": []
+ },
+ "deep-eql@3.0.1": {
+ "name": "deep-eql",
+ "version": "3.0.1",
+ "dependencies": [
+ "type-detect@4.0.8"
+ ]
+ },
+ "get-func-name@2.0.0": {
+ "name": "get-func-name",
+ "version": "2.0.0",
+ "dependencies": []
+ },
+ "has-flag@4.0.0": {
+ "name": "has-flag",
+ "version": "4.0.0",
+ "dependencies": []
+ },
+ "loupe@2.3.4": {
+ "name": "loupe",
+ "version": "2.3.4",
+ "dependencies": [
+ "get-func-name@2.0.0"
+ ]
+ },
+ "pathval@1.1.1": {
+ "name": "pathval",
+ "version": "1.1.1",
+ "dependencies": []
+ },
+ "supports-color@7.2.0": {
+ "name": "supports-color",
+ "version": "7.2.0",
+ "dependencies": [
+ "has-flag@4.0.0"
+ ]
+ },
+ "type-detect@4.0.8": {
+ "name": "type-detect",
+ "version": "4.0.8",
+ "dependencies": []
+ }
+ }
+}
diff --git a/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_node_modules.out b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_node_modules.out
new file mode 100644
index 000000000..1ab367952
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_json/cjs_with_deps/main_node_modules.out
@@ -0,0 +1,47 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chai
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/assertion-error
+Download http://localhost:4260/check-error
+Download http://localhost:4260/deep-eql
+Download http://localhost:4260/get-func-name
+Download http://localhost:4260/loupe
+Download http://localhost:4260/pathval
+Download http://localhost:4260/type-detect
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Initialize ansi-styles@4.3.0
+Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz
+Initialize assertion-error@1.1.0
+Download http://localhost:4260/chai/chai-4.3.6.tgz
+Initialize chai@4.3.6
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Initialize chalk@4.1.2
+Download http://localhost:4260/check-error/check-error-1.0.2.tgz
+Initialize check-error@1.0.2
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Initialize color-convert@2.0.1
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Initialize color-name@1.1.4
+Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz
+Initialize deep-eql@3.0.1
+Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz
+Initialize get-func-name@2.0.0
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Initialize has-flag@4.0.0
+Download http://localhost:4260/loupe/loupe-2.3.4.tgz
+Initialize loupe@2.3.4
+Download http://localhost:4260/pathval/pathval-1.1.1.tgz
+Initialize pathval@1.1.1
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Initialize supports-color@7.2.0
+Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz
+Initialize type-detect@4.0.8
+[UNORDERED_END]
+chalk cjs loads
diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/__test__.jsonc b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/__test__.jsonc
new file mode 100644
index 000000000..1b34f4813
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "info --quiet --node-modules-dir --json cjs_with_deps/main.js",
+ "output": "cjs_with_deps/main_info_json.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.js b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.js
new file mode 100644
index 000000000..568726874
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.js
@@ -0,0 +1,12 @@
+import chalk from "npm:chalk@4";
+import { expect } from "npm:chai@4.3";
+
+console.log(chalk.green("chalk cjs loads"));
+
+const timeout = setTimeout(() => {}, 0);
+expect(timeout).to.be.a("number");
+clearTimeout(timeout);
+
+const interval = setInterval(() => {}, 100);
+expect(interval).to.be.a("number");
+clearInterval(interval);
diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.out b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.out
new file mode 100644
index 000000000..7051c2395
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main.out
@@ -0,0 +1,33 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chai
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/assertion-error
+Download http://localhost:4260/check-error
+Download http://localhost:4260/deep-eql
+Download http://localhost:4260/get-func-name
+Download http://localhost:4260/loupe
+Download http://localhost:4260/pathval
+Download http://localhost:4260/type-detect
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz
+Download http://localhost:4260/chai/chai-4.3.6.tgz
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Download http://localhost:4260/check-error/check-error-1.0.2.tgz
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz
+Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Download http://localhost:4260/loupe/loupe-2.3.4.tgz
+Download http://localhost:4260/pathval/pathval-1.1.1.tgz
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz
+[UNORDERED_END]
+chalk cjs loads
diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out
new file mode 100644
index 000000000..8e37c88eb
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info.out
@@ -0,0 +1,22 @@
+local: [WILDCARD]main.js
+type: JavaScript
+dependencies: 14 unique
+size: [WILDCARD]
+
+file:///[WILDCARD]/cjs_with_deps/main.js ([WILDCARD])
+├─┬ npm:/chalk@4.1.2 ([WILDCARD])
+│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD])
+│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD])
+│ │ └── npm:/color-name@1.1.4 ([WILDCARD])
+│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD])
+│ └── npm:/has-flag@4.0.0 ([WILDCARD])
+└─┬ npm:/chai@4.3.6 ([WILDCARD])
+ ├── npm:/assertion-error@1.1.0 ([WILDCARD])
+ ├── npm:/check-error@1.0.2 ([WILDCARD])
+ ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD])
+ │ └── npm:/type-detect@4.0.8 ([WILDCARD])
+ ├── npm:/get-func-name@2.0.0 ([WILDCARD])
+ ├─┬ npm:/loupe@2.3.4 ([WILDCARD])
+ │ └── npm:/get-func-name@2.0.0 ([WILDCARD])
+ ├── npm:/pathval@1.1.1 ([WILDCARD])
+ └── npm:/type-detect@4.0.8 ([WILDCARD])
diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out
new file mode 100644
index 000000000..af1ef1351
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out
@@ -0,0 +1,148 @@
+{
+ "roots": [
+ "file://[WILDCARD]/main.js"
+ ],
+ "modules": [
+ {
+ "kind": "esm",
+ "dependencies": [
+ {
+ "specifier": "npm:chalk@4",
+ "code": {
+ "specifier": "npm:chalk@4",
+ "span": {
+ "start": {
+ "line": 0,
+ "character": 18
+ },
+ "end": {
+ "line": 0,
+ "character": 31
+ }
+ }
+ },
+ "npmPackage": "chalk@4.1.2"
+ },
+ {
+ "specifier": "npm:chai@4.3",
+ "code": {
+ "specifier": "npm:chai@4.3",
+ "span": {
+ "start": {
+ "line": 1,
+ "character": 23
+ },
+ "end": {
+ "line": 1,
+ "character": 37
+ }
+ }
+ },
+ "npmPackage": "chai@4.3.6"
+ }
+ ],
+ "local": "[WILDCARD]main.js",
+ "size": 325,
+ "mediaType": "JavaScript",
+ "specifier": "[WILDCARD]/main.js"
+ }
+ ],
+ "redirects": {
+ "npm:chai@4.3": "npm:/chai@4.3.6",
+ "npm:chalk@4": "npm:/chalk@4.1.2"
+ },
+ "version": 1,
+ "npmPackages": {
+ "ansi-styles@4.3.0": {
+ "name": "ansi-styles",
+ "version": "4.3.0",
+ "dependencies": [
+ "color-convert@2.0.1"
+ ]
+ },
+ "assertion-error@1.1.0": {
+ "name": "assertion-error",
+ "version": "1.1.0",
+ "dependencies": []
+ },
+ "chai@4.3.6": {
+ "name": "chai",
+ "version": "4.3.6",
+ "dependencies": [
+ "assertion-error@1.1.0",
+ "check-error@1.0.2",
+ "deep-eql@3.0.1",
+ "get-func-name@2.0.0",
+ "loupe@2.3.4",
+ "pathval@1.1.1",
+ "type-detect@4.0.8"
+ ]
+ },
+ "chalk@4.1.2": {
+ "name": "chalk",
+ "version": "4.1.2",
+ "dependencies": [
+ "ansi-styles@4.3.0",
+ "supports-color@7.2.0"
+ ]
+ },
+ "check-error@1.0.2": {
+ "name": "check-error",
+ "version": "1.0.2",
+ "dependencies": []
+ },
+ "color-convert@2.0.1": {
+ "name": "color-convert",
+ "version": "2.0.1",
+ "dependencies": [
+ "color-name@1.1.4"
+ ]
+ },
+ "color-name@1.1.4": {
+ "name": "color-name",
+ "version": "1.1.4",
+ "dependencies": []
+ },
+ "deep-eql@3.0.1": {
+ "name": "deep-eql",
+ "version": "3.0.1",
+ "dependencies": [
+ "type-detect@4.0.8"
+ ]
+ },
+ "get-func-name@2.0.0": {
+ "name": "get-func-name",
+ "version": "2.0.0",
+ "dependencies": []
+ },
+ "has-flag@4.0.0": {
+ "name": "has-flag",
+ "version": "4.0.0",
+ "dependencies": []
+ },
+ "loupe@2.3.4": {
+ "name": "loupe",
+ "version": "2.3.4",
+ "dependencies": [
+ "get-func-name@2.0.0"
+ ]
+ },
+ "pathval@1.1.1": {
+ "name": "pathval",
+ "version": "1.1.1",
+ "dependencies": []
+ },
+ "supports-color@7.2.0": {
+ "name": "supports-color",
+ "version": "7.2.0",
+ "dependencies": [
+ "has-flag@4.0.0"
+ ]
+ },
+ "type-detect@4.0.8": {
+ "name": "type-detect",
+ "version": "4.0.8",
+ "dependencies": []
+ }
+ }
+}
diff --git a/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out
new file mode 100644
index 000000000..1ab367952
--- /dev/null
+++ b/tests/specs/npm_tests/info_chalk_json_node_modules_dir/cjs_with_deps/main_node_modules.out
@@ -0,0 +1,47 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chai
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/assertion-error
+Download http://localhost:4260/check-error
+Download http://localhost:4260/deep-eql
+Download http://localhost:4260/get-func-name
+Download http://localhost:4260/loupe
+Download http://localhost:4260/pathval
+Download http://localhost:4260/type-detect
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Initialize ansi-styles@4.3.0
+Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz
+Initialize assertion-error@1.1.0
+Download http://localhost:4260/chai/chai-4.3.6.tgz
+Initialize chai@4.3.6
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Initialize chalk@4.1.2
+Download http://localhost:4260/check-error/check-error-1.0.2.tgz
+Initialize check-error@1.0.2
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Initialize color-convert@2.0.1
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Initialize color-name@1.1.4
+Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz
+Initialize deep-eql@3.0.1
+Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz
+Initialize get-func-name@2.0.0
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Initialize has-flag@4.0.0
+Download http://localhost:4260/loupe/loupe-2.3.4.tgz
+Initialize loupe@2.3.4
+Download http://localhost:4260/pathval/pathval-1.1.1.tgz
+Initialize pathval@1.1.1
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Initialize supports-color@7.2.0
+Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz
+Initialize type-detect@4.0.8
+[UNORDERED_END]
+chalk cjs loads
diff --git a/tests/specs/npm_tests/info_cli_chalk_display/__test__.jsonc b/tests/specs/npm_tests/info_cli_chalk_display/__test__.jsonc
new file mode 100644
index 000000000..7587fbcb6
--- /dev/null
+++ b/tests/specs/npm_tests/info_cli_chalk_display/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "info --quiet npm:chalk@4",
+ "output": "info/chalk.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/info/chalk.out b/tests/specs/npm_tests/info_cli_chalk_display/info/chalk.out
index 63fa20da5..63fa20da5 100644
--- a/tests/testdata/npm/info/chalk.out
+++ b/tests/specs/npm_tests/info_cli_chalk_display/info/chalk.out
diff --git a/tests/testdata/npm/info/chalk_json.out b/tests/specs/npm_tests/info_cli_chalk_display/info/chalk_json.out
index d54155270..d54155270 100644
--- a/tests/testdata/npm/info/chalk_json.out
+++ b/tests/specs/npm_tests/info_cli_chalk_display/info/chalk_json.out
diff --git a/tests/specs/npm_tests/info_cli_chalk_json/__test__.jsonc b/tests/specs/npm_tests/info_cli_chalk_json/__test__.jsonc
new file mode 100644
index 000000000..b5173fd93
--- /dev/null
+++ b/tests/specs/npm_tests/info_cli_chalk_json/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "info --quiet --json npm:chalk@4",
+ "output": "info/chalk_json.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/info_cli_chalk_json/info/chalk.out b/tests/specs/npm_tests/info_cli_chalk_json/info/chalk.out
new file mode 100644
index 000000000..63fa20da5
--- /dev/null
+++ b/tests/specs/npm_tests/info_cli_chalk_json/info/chalk.out
@@ -0,0 +1,9 @@
+dependencies: 5 unique
+size: [WILDCARD]
+
+npm:/chalk@4.1.2 ([WILDCARD])
+├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD])
+│ └─┬ npm:/color-convert@2.0.1 ([WILDCARD])
+│ └── npm:/color-name@1.1.4 ([WILDCARD])
+└─┬ npm:/supports-color@7.2.0 ([WILDCARD])
+ └── npm:/has-flag@4.0.0 ([WILDCARD])
diff --git a/tests/specs/npm_tests/info_cli_chalk_json/info/chalk_json.out b/tests/specs/npm_tests/info_cli_chalk_json/info/chalk_json.out
new file mode 100644
index 000000000..d54155270
--- /dev/null
+++ b/tests/specs/npm_tests/info_cli_chalk_json/info/chalk_json.out
@@ -0,0 +1,57 @@
+{
+ "roots": [
+ "npm:chalk@4"
+ ],
+ "modules": [
+ {
+ "kind": "npm",
+ "specifier": "npm:/chalk@4.1.2",
+ "npmPackage": "chalk@4.1.2"
+ }
+ ],
+ "redirects": {
+ "npm:chalk@4": "npm:/chalk@4.1.2"
+ },
+ "version": 1,
+ "npmPackages": {
+ "ansi-styles@4.3.0": {
+ "name": "ansi-styles",
+ "version": "4.3.0",
+ "dependencies": [
+ "color-convert@2.0.1"
+ ]
+ },
+ "chalk@4.1.2": {
+ "name": "chalk",
+ "version": "4.1.2",
+ "dependencies": [
+ "ansi-styles@4.3.0",
+ "supports-color@7.2.0"
+ ]
+ },
+ "color-convert@2.0.1": {
+ "name": "color-convert",
+ "version": "2.0.1",
+ "dependencies": [
+ "color-name@1.1.4"
+ ]
+ },
+ "color-name@1.1.4": {
+ "name": "color-name",
+ "version": "1.1.4",
+ "dependencies": []
+ },
+ "has-flag@4.0.0": {
+ "name": "has-flag",
+ "version": "4.0.0",
+ "dependencies": []
+ },
+ "supports-color@7.2.0": {
+ "name": "supports-color",
+ "version": "7.2.0",
+ "dependencies": [
+ "has-flag@4.0.0"
+ ]
+ }
+ }
+}
diff --git a/tests/specs/npm_tests/info_peer_deps/__test__.jsonc b/tests/specs/npm_tests/info_peer_deps/__test__.jsonc
new file mode 100644
index 000000000..e505f3077
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "info --quiet peer_deps_with_copied_folders/main.ts",
+ "output": "peer_deps_with_copied_folders/main_info.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.out b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.out
new file mode 100644
index 000000000..3c133bcde
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.out
@@ -0,0 +1,14 @@
+[UNORDERED_START]
+Download http://localhost:4260/@denotest/peer-dep-test-child
+Download http://localhost:4260/@denotest/peer-dep-test-grandchild
+Download http://localhost:4260/@denotest/peer-dep-test-peer
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz
+Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz
+Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz
+Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz
+Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz
+[UNORDERED_END]
+1
+2
diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.ts b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.ts
new file mode 100644
index 000000000..a8ea8104a
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main.ts
@@ -0,0 +1,5 @@
+import version1 from "npm:@denotest/peer-dep-test-child@1";
+import version2 from "npm:@denotest/peer-dep-test-child@2";
+
+console.error(version1);
+console.error(version2);
diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info.out b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info.out
new file mode 100644
index 000000000..e8b92399d
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info.out
@@ -0,0 +1,14 @@
+local: [WILDCARD]main.ts
+type: TypeScript
+dependencies: 6 unique
+size: [WILDCARD]
+
+file:///[WILDCARD]/peer_deps_with_copied_folders/main.ts (171B)
+├─┬ npm:/@denotest/peer-dep-test-child@1.0.0 ([WILDCARD])
+│ ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0 ([WILDCARD])
+│ │ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD])
+│ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD])
+└─┬ npm:/@denotest/peer-dep-test-child@2.0.0 ([WILDCARD])
+ ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0 ([WILDCARD])
+ │ └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD])
+ └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD])
diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out
new file mode 100644
index 000000000..1a5f07c97
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_info_json.out
@@ -0,0 +1,97 @@
+{
+ "roots": [
+ "[WILDCARD]/peer_deps_with_copied_folders/main.ts"
+ ],
+ "modules": [
+ {
+ "kind": "esm",
+ "dependencies": [
+ {
+ "specifier": "npm:@denotest/peer-dep-test-child@1",
+ "code": {
+ "specifier": "npm:@denotest/peer-dep-test-child@1",
+ "span": {
+ "start": {
+ "line": 0,
+ "character": 21
+ },
+ "end": {
+ "line": 0,
+ "character": 58
+ }
+ }
+ },
+ "npmPackage": "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0"
+ },
+ {
+ "specifier": "npm:@denotest/peer-dep-test-child@2",
+ "code": {
+ "specifier": "npm:@denotest/peer-dep-test-child@2",
+ "span": {
+ "start": {
+ "line": 1,
+ "character": 21
+ },
+ "end": {
+ "line": 1,
+ "character": 58
+ }
+ }
+ },
+ "npmPackage": "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0"
+ }
+ ],
+ "local": "[WILDCARD]main.ts",
+ "size": 171,
+ "mediaType": "TypeScript",
+ "specifier": "file://[WILDCARD]/main.ts"
+ }
+ ],
+ "redirects": {
+ "npm:@denotest/peer-dep-test-child@1": "npm:/@denotest/peer-dep-test-child@1.0.0",
+ "npm:@denotest/peer-dep-test-child@2": "npm:/@denotest/peer-dep-test-child@2.0.0"
+ },
+ "version": 1,
+ "npmPackages": {
+ "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0": {
+ "name": "@denotest/peer-dep-test-child",
+ "version": "1.0.0",
+ "dependencies": [
+ "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0",
+ "@denotest/peer-dep-test-peer@1.0.0"
+ ]
+ },
+ "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0": {
+ "name": "@denotest/peer-dep-test-child",
+ "version": "2.0.0",
+ "dependencies": [
+ "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0",
+ "@denotest/peer-dep-test-peer@2.0.0"
+ ]
+ },
+ "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0": {
+ "name": "@denotest/peer-dep-test-grandchild",
+ "version": "1.0.0",
+ "dependencies": [
+ "@denotest/peer-dep-test-peer@1.0.0"
+ ]
+ },
+ "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0": {
+ "name": "@denotest/peer-dep-test-grandchild",
+ "version": "1.0.0",
+ "dependencies": [
+ "@denotest/peer-dep-test-peer@2.0.0"
+ ]
+ },
+ "@denotest/peer-dep-test-peer@1.0.0": {
+ "name": "@denotest/peer-dep-test-peer",
+ "version": "1.0.0",
+ "dependencies": []
+ },
+ "@denotest/peer-dep-test-peer@2.0.0": {
+ "name": "@denotest/peer-dep-test-peer",
+ "version": "2.0.0",
+ "dependencies": []
+ }
+ }
+}
diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out
new file mode 100644
index 000000000..02b5cbafd
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules.out
@@ -0,0 +1,9 @@
+[UNORDERED_START]
+Initialize @denotest/peer-dep-test-child@1.0.0
+Initialize @denotest/peer-dep-test-child@2.0.0
+Initialize @denotest/peer-dep-test-grandchild@1.0.0
+Initialize @denotest/peer-dep-test-peer@1.0.0
+Initialize @denotest/peer-dep-test-peer@2.0.0
+[UNORDERED_END]
+1
+2
diff --git a/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out
new file mode 100644
index 000000000..9c8145211
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps/peer_deps_with_copied_folders/main_node_modules_reload.out
@@ -0,0 +1,19 @@
+[UNORDERED_START]
+Download http://localhost:4260/@denotest/peer-dep-test-child
+Download http://localhost:4260/@denotest/peer-dep-test-grandchild
+Download http://localhost:4260/@denotest/peer-dep-test-peer
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz
+Initialize @denotest/peer-dep-test-child@1.0.0
+Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz
+Initialize @denotest/peer-dep-test-child@2.0.0
+Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz
+Initialize @denotest/peer-dep-test-grandchild@1.0.0
+Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz
+Initialize @denotest/peer-dep-test-peer@1.0.0
+Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz
+Initialize @denotest/peer-dep-test-peer@2.0.0
+[UNORDERED_END]
+1
+2
diff --git a/tests/specs/npm_tests/info_peer_deps_json/__test__.jsonc b/tests/specs/npm_tests/info_peer_deps_json/__test__.jsonc
new file mode 100644
index 000000000..9a630add4
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps_json/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "info --quiet --json peer_deps_with_copied_folders/main.ts",
+ "output": "peer_deps_with_copied_folders/main_info_json.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.out b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.out
new file mode 100644
index 000000000..3c133bcde
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.out
@@ -0,0 +1,14 @@
+[UNORDERED_START]
+Download http://localhost:4260/@denotest/peer-dep-test-child
+Download http://localhost:4260/@denotest/peer-dep-test-grandchild
+Download http://localhost:4260/@denotest/peer-dep-test-peer
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz
+Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz
+Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz
+Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz
+Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz
+[UNORDERED_END]
+1
+2
diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.ts b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.ts
new file mode 100644
index 000000000..a8ea8104a
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main.ts
@@ -0,0 +1,5 @@
+import version1 from "npm:@denotest/peer-dep-test-child@1";
+import version2 from "npm:@denotest/peer-dep-test-child@2";
+
+console.error(version1);
+console.error(version2);
diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out
new file mode 100644
index 000000000..e8b92399d
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info.out
@@ -0,0 +1,14 @@
+local: [WILDCARD]main.ts
+type: TypeScript
+dependencies: 6 unique
+size: [WILDCARD]
+
+file:///[WILDCARD]/peer_deps_with_copied_folders/main.ts (171B)
+├─┬ npm:/@denotest/peer-dep-test-child@1.0.0 ([WILDCARD])
+│ ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0 ([WILDCARD])
+│ │ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD])
+│ └── npm:/@denotest/peer-dep-test-peer@1.0.0 ([WILDCARD])
+└─┬ npm:/@denotest/peer-dep-test-child@2.0.0 ([WILDCARD])
+ ├─┬ npm:/@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0 ([WILDCARD])
+ │ └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD])
+ └── npm:/@denotest/peer-dep-test-peer@2.0.0 ([WILDCARD])
diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out
new file mode 100644
index 000000000..1a5f07c97
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out
@@ -0,0 +1,97 @@
+{
+ "roots": [
+ "[WILDCARD]/peer_deps_with_copied_folders/main.ts"
+ ],
+ "modules": [
+ {
+ "kind": "esm",
+ "dependencies": [
+ {
+ "specifier": "npm:@denotest/peer-dep-test-child@1",
+ "code": {
+ "specifier": "npm:@denotest/peer-dep-test-child@1",
+ "span": {
+ "start": {
+ "line": 0,
+ "character": 21
+ },
+ "end": {
+ "line": 0,
+ "character": 58
+ }
+ }
+ },
+ "npmPackage": "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0"
+ },
+ {
+ "specifier": "npm:@denotest/peer-dep-test-child@2",
+ "code": {
+ "specifier": "npm:@denotest/peer-dep-test-child@2",
+ "span": {
+ "start": {
+ "line": 1,
+ "character": 21
+ },
+ "end": {
+ "line": 1,
+ "character": 58
+ }
+ }
+ },
+ "npmPackage": "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0"
+ }
+ ],
+ "local": "[WILDCARD]main.ts",
+ "size": 171,
+ "mediaType": "TypeScript",
+ "specifier": "file://[WILDCARD]/main.ts"
+ }
+ ],
+ "redirects": {
+ "npm:@denotest/peer-dep-test-child@1": "npm:/@denotest/peer-dep-test-child@1.0.0",
+ "npm:@denotest/peer-dep-test-child@2": "npm:/@denotest/peer-dep-test-child@2.0.0"
+ },
+ "version": 1,
+ "npmPackages": {
+ "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0": {
+ "name": "@denotest/peer-dep-test-child",
+ "version": "1.0.0",
+ "dependencies": [
+ "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0",
+ "@denotest/peer-dep-test-peer@1.0.0"
+ ]
+ },
+ "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0": {
+ "name": "@denotest/peer-dep-test-child",
+ "version": "2.0.0",
+ "dependencies": [
+ "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0",
+ "@denotest/peer-dep-test-peer@2.0.0"
+ ]
+ },
+ "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0": {
+ "name": "@denotest/peer-dep-test-grandchild",
+ "version": "1.0.0",
+ "dependencies": [
+ "@denotest/peer-dep-test-peer@1.0.0"
+ ]
+ },
+ "@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0": {
+ "name": "@denotest/peer-dep-test-grandchild",
+ "version": "1.0.0",
+ "dependencies": [
+ "@denotest/peer-dep-test-peer@2.0.0"
+ ]
+ },
+ "@denotest/peer-dep-test-peer@1.0.0": {
+ "name": "@denotest/peer-dep-test-peer",
+ "version": "1.0.0",
+ "dependencies": []
+ },
+ "@denotest/peer-dep-test-peer@2.0.0": {
+ "name": "@denotest/peer-dep-test-peer",
+ "version": "2.0.0",
+ "dependencies": []
+ }
+ }
+}
diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out
new file mode 100644
index 000000000..02b5cbafd
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules.out
@@ -0,0 +1,9 @@
+[UNORDERED_START]
+Initialize @denotest/peer-dep-test-child@1.0.0
+Initialize @denotest/peer-dep-test-child@2.0.0
+Initialize @denotest/peer-dep-test-grandchild@1.0.0
+Initialize @denotest/peer-dep-test-peer@1.0.0
+Initialize @denotest/peer-dep-test-peer@2.0.0
+[UNORDERED_END]
+1
+2
diff --git a/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out
new file mode 100644
index 000000000..9c8145211
--- /dev/null
+++ b/tests/specs/npm_tests/info_peer_deps_json/peer_deps_with_copied_folders/main_node_modules_reload.out
@@ -0,0 +1,19 @@
+[UNORDERED_START]
+Download http://localhost:4260/@denotest/peer-dep-test-child
+Download http://localhost:4260/@denotest/peer-dep-test-grandchild
+Download http://localhost:4260/@denotest/peer-dep-test-peer
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/@denotest/peer-dep-test-child/1.0.0.tgz
+Initialize @denotest/peer-dep-test-child@1.0.0
+Download http://localhost:4260/@denotest/peer-dep-test-child/2.0.0.tgz
+Initialize @denotest/peer-dep-test-child@2.0.0
+Download http://localhost:4260/@denotest/peer-dep-test-grandchild/1.0.0.tgz
+Initialize @denotest/peer-dep-test-grandchild@1.0.0
+Download http://localhost:4260/@denotest/peer-dep-test-peer/1.0.0.tgz
+Initialize @denotest/peer-dep-test-peer@1.0.0
+Download http://localhost:4260/@denotest/peer-dep-test-peer/2.0.0.tgz
+Initialize @denotest/peer-dep-test-peer@2.0.0
+[UNORDERED_END]
+1
+2
diff --git a/tests/specs/npm_tests/mixed_case_package_name_global_dir/__test__.jsonc b/tests/specs/npm_tests/mixed_case_package_name_global_dir/__test__.jsonc
new file mode 100644
index 000000000..cc9359aab
--- /dev/null
+++ b/tests/specs/npm_tests/mixed_case_package_name_global_dir/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run mixed_case_package_name/global.ts",
+ "output": "mixed_case_package_name/global.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/mixed_case_package_name/global.out b/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.out
index fdacea385..fdacea385 100644
--- a/tests/testdata/npm/mixed_case_package_name/global.out
+++ b/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.out
diff --git a/tests/testdata/npm/mixed_case_package_name/global.ts b/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts
index a721b3d78..a721b3d78 100644
--- a/tests/testdata/npm/mixed_case_package_name/global.ts
+++ b/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/global.ts
diff --git a/tests/testdata/npm/mixed_case_package_name/local.out b/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.out
index 6ab989d80..6ab989d80 100644
--- a/tests/testdata/npm/mixed_case_package_name/local.out
+++ b/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.out
diff --git a/tests/testdata/npm/mixed_case_package_name/local.ts b/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts
index 6ca6cb581..6ca6cb581 100644
--- a/tests/testdata/npm/mixed_case_package_name/local.ts
+++ b/tests/specs/npm_tests/mixed_case_package_name_global_dir/mixed_case_package_name/local.ts
diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/__test__.jsonc b/tests/specs/npm_tests/mixed_case_package_name_local_dir/__test__.jsonc
new file mode 100644
index 000000000..0778cb562
--- /dev/null
+++ b/tests/specs/npm_tests/mixed_case_package_name_local_dir/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --node-modules-dir=auto -A mixed_case_package_name/local.ts",
+ "output": "mixed_case_package_name/local.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.out b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.out
new file mode 100644
index 000000000..fdacea385
--- /dev/null
+++ b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.out
@@ -0,0 +1,9 @@
+[UNORDERED_START]
+Download http://localhost:4260/@denotest/MixedCase
+Download http://localhost:4260/@denotest/CAPITALS
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/@denotest/CAPITALS/1.0.0.tgz
+Download http://localhost:4260/@denotest/MixedCase/1.0.0.tgz
+[UNORDERED_END]
+5
diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts
new file mode 100644
index 000000000..a721b3d78
--- /dev/null
+++ b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/global.ts
@@ -0,0 +1,2 @@
+import value from "npm:@denotest/MixedCase";
+console.log(value);
diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.out b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.out
new file mode 100644
index 000000000..6ab989d80
--- /dev/null
+++ b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.out
@@ -0,0 +1,13 @@
+[UNORDERED_START]
+Download http://localhost:4260/@denotest/MixedCase
+Download http://localhost:4260/@denotest/CAPITALS
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/@denotest/CAPITALS/1.0.0.tgz
+Initialize @denotest/CAPITALS@1.0.0
+Download http://localhost:4260/@denotest/MixedCase/1.0.0.tgz
+Initialize @denotest/MixedCase@1.0.0
+[UNORDERED_END]
+5
+true
+true
diff --git a/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts
new file mode 100644
index 000000000..6ca6cb581
--- /dev/null
+++ b/tests/specs/npm_tests/mixed_case_package_name_local_dir/mixed_case_package_name/local.ts
@@ -0,0 +1,18 @@
+import value from "npm:@denotest/MixedCase";
+console.log(value);
+console.log(pathExists("./node_modules/.deno"));
+console.log(
+ pathExists("./node_modules/.deno/_ibsgk3tporsxg5bpinavaskuifgfg@1.0.0"),
+);
+
+function pathExists(filePath: string) {
+ try {
+ Deno.lstatSync(filePath);
+ return true;
+ } catch (error) {
+ if (error instanceof Deno.errors.NotFound) {
+ return false;
+ }
+ throw error;
+ }
+}
diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules/__test__.jsonc b/tests/specs/npm_tests/node_modules_deno_node_modules/__test__.jsonc
new file mode 100644
index 000000000..377fd05ea
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_deno_node_modules/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --quiet node_modules_deno_node_modules/main.ts",
+ "output": "node_modules_deno_node_modules/main.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/node_modules_deno_node_modules/main.out b/tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out
index 1ebdb2dd5..1ebdb2dd5 100644
--- a/tests/testdata/npm/node_modules_deno_node_modules/main.out
+++ b/tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.out
diff --git a/tests/testdata/npm/node_modules_deno_node_modules/main.ts b/tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.ts
index 6e4a32d8e..6e4a32d8e 100644
--- a/tests/testdata/npm/node_modules_deno_node_modules/main.ts
+++ b/tests/specs/npm_tests/node_modules_deno_node_modules/node_modules_deno_node_modules/main.ts
diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules_local/__test__.jsonc b/tests/specs/npm_tests/node_modules_deno_node_modules_local/__test__.jsonc
new file mode 100644
index 000000000..a1e67b32b
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_deno_node_modules_local/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --quiet --node-modules-dir node_modules_deno_node_modules/main.ts",
+ "output": "node_modules_deno_node_modules/main.out",
+ "exitCode": 0,
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out b/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out
new file mode 100644
index 000000000..1ebdb2dd5
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.out
@@ -0,0 +1,2 @@
+esm
+esm
diff --git a/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts b/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts
new file mode 100644
index 000000000..6e4a32d8e
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_deno_node_modules_local/node_modules_deno_node_modules/main.ts
@@ -0,0 +1,7 @@
+import { getKind as getKind1 } from "npm:@denotest/dual-cjs-esm-dep";
+// this should still be able to be resolved even though it's missing the
+// "@denotest/dual-cjs-esm" package because the above import will resolve it
+import { getKind as getKind2 } from "npm:@denotest/dual-cjs-esm-dep-missing";
+
+console.log(getKind1());
+console.log(getKind2());
diff --git a/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/__test__.jsonc b/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/__test__.jsonc
new file mode 100644
index 000000000..5813bb3f2
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --node-modules-dir=auto -A --quiet require_added_nm_folder/main.js",
+ "output": "require_added_nm_folder/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 0
+}
diff --git a/tests/testdata/npm/require_added_nm_folder/main.js b/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js
index 723b2023a..723b2023a 100644
--- a/tests/testdata/npm/require_added_nm_folder/main.js
+++ b/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.js
diff --git a/tests/testdata/npm/require_added_nm_folder/main.out b/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.out
index 7ed6ff82d..7ed6ff82d 100644
--- a/tests/testdata/npm/require_added_nm_folder/main.out
+++ b/tests/specs/npm_tests/node_modules_dir_require_added_node_modules_folder/require_added_nm_folder/main.out
diff --git a/tests/specs/npm_tests/node_modules_dir_require_main_entry/__test__.jsonc b/tests/specs/npm_tests/node_modules_dir_require_main_entry/__test__.jsonc
new file mode 100644
index 000000000..45936f1de
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_dir_require_main_entry/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --node-modules-dir -A --quiet require_main/main.js",
+ "output": "require_main/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 0
+}
diff --git a/tests/testdata/npm/require_main/main.js b/tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.js
index ddecd4fdb..ddecd4fdb 100644
--- a/tests/testdata/npm/require_main/main.js
+++ b/tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.js
diff --git a/tests/testdata/npm/require_main/main.out b/tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.out
index e2dbde096..e2dbde096 100644
--- a/tests/testdata/npm/require_main/main.out
+++ b/tests/specs/npm_tests/node_modules_dir_require_main_entry/require_main/main.out
diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/__test__.jsonc b/tests/specs/npm_tests/node_modules_dir_with_deps/__test__.jsonc
new file mode 100644
index 000000000..ae79e8a47
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_dir_with_deps/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read --allow-env --node-modules-dir=auto cjs_with_deps/main.js",
+ "output": "cjs_with_deps/main_node_modules.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.js b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.js
new file mode 100644
index 000000000..568726874
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.js
@@ -0,0 +1,12 @@
+import chalk from "npm:chalk@4";
+import { expect } from "npm:chai@4.3";
+
+console.log(chalk.green("chalk cjs loads"));
+
+const timeout = setTimeout(() => {}, 0);
+expect(timeout).to.be.a("number");
+clearTimeout(timeout);
+
+const interval = setInterval(() => {}, 100);
+expect(interval).to.be.a("number");
+clearInterval(interval);
diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.out b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.out
new file mode 100644
index 000000000..7051c2395
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main.out
@@ -0,0 +1,33 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chai
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/assertion-error
+Download http://localhost:4260/check-error
+Download http://localhost:4260/deep-eql
+Download http://localhost:4260/get-func-name
+Download http://localhost:4260/loupe
+Download http://localhost:4260/pathval
+Download http://localhost:4260/type-detect
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz
+Download http://localhost:4260/chai/chai-4.3.6.tgz
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Download http://localhost:4260/check-error/check-error-1.0.2.tgz
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz
+Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Download http://localhost:4260/loupe/loupe-2.3.4.tgz
+Download http://localhost:4260/pathval/pathval-1.1.1.tgz
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz
+[UNORDERED_END]
+chalk cjs loads
diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info.out b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info.out
new file mode 100644
index 000000000..bcaaf1eec
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info.out
@@ -0,0 +1,22 @@
+local: [WILDCARD]main.js
+type: JavaScript
+dependencies: 14 unique
+size: [WILDCARD]
+
+file:///[WILDCARD]/npm/cjs_with_deps/main.js ([WILDCARD])
+├─┬ npm:/chalk@4.1.2 ([WILDCARD])
+│ ├─┬ npm:/ansi-styles@4.3.0 ([WILDCARD])
+│ │ └─┬ npm:/color-convert@2.0.1 ([WILDCARD])
+│ │ └── npm:/color-name@1.1.4 ([WILDCARD])
+│ └─┬ npm:/supports-color@7.2.0 ([WILDCARD])
+│ └── npm:/has-flag@4.0.0 ([WILDCARD])
+└─┬ npm:/chai@4.3.6 ([WILDCARD])
+ ├── npm:/assertion-error@1.1.0 ([WILDCARD])
+ ├── npm:/check-error@1.0.2 ([WILDCARD])
+ ├─┬ npm:/deep-eql@3.0.1 ([WILDCARD])
+ │ └── npm:/type-detect@4.0.8 ([WILDCARD])
+ ├── npm:/get-func-name@2.0.0 ([WILDCARD])
+ ├─┬ npm:/loupe@2.3.4 ([WILDCARD])
+ │ └── npm:/get-func-name@2.0.0 ([WILDCARD])
+ ├── npm:/pathval@1.1.1 ([WILDCARD])
+ └── npm:/type-detect@4.0.8 ([WILDCARD])
diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out
new file mode 100644
index 000000000..af1ef1351
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_info_json.out
@@ -0,0 +1,148 @@
+{
+ "roots": [
+ "file://[WILDCARD]/main.js"
+ ],
+ "modules": [
+ {
+ "kind": "esm",
+ "dependencies": [
+ {
+ "specifier": "npm:chalk@4",
+ "code": {
+ "specifier": "npm:chalk@4",
+ "span": {
+ "start": {
+ "line": 0,
+ "character": 18
+ },
+ "end": {
+ "line": 0,
+ "character": 31
+ }
+ }
+ },
+ "npmPackage": "chalk@4.1.2"
+ },
+ {
+ "specifier": "npm:chai@4.3",
+ "code": {
+ "specifier": "npm:chai@4.3",
+ "span": {
+ "start": {
+ "line": 1,
+ "character": 23
+ },
+ "end": {
+ "line": 1,
+ "character": 37
+ }
+ }
+ },
+ "npmPackage": "chai@4.3.6"
+ }
+ ],
+ "local": "[WILDCARD]main.js",
+ "size": 325,
+ "mediaType": "JavaScript",
+ "specifier": "[WILDCARD]/main.js"
+ }
+ ],
+ "redirects": {
+ "npm:chai@4.3": "npm:/chai@4.3.6",
+ "npm:chalk@4": "npm:/chalk@4.1.2"
+ },
+ "version": 1,
+ "npmPackages": {
+ "ansi-styles@4.3.0": {
+ "name": "ansi-styles",
+ "version": "4.3.0",
+ "dependencies": [
+ "color-convert@2.0.1"
+ ]
+ },
+ "assertion-error@1.1.0": {
+ "name": "assertion-error",
+ "version": "1.1.0",
+ "dependencies": []
+ },
+ "chai@4.3.6": {
+ "name": "chai",
+ "version": "4.3.6",
+ "dependencies": [
+ "assertion-error@1.1.0",
+ "check-error@1.0.2",
+ "deep-eql@3.0.1",
+ "get-func-name@2.0.0",
+ "loupe@2.3.4",
+ "pathval@1.1.1",
+ "type-detect@4.0.8"
+ ]
+ },
+ "chalk@4.1.2": {
+ "name": "chalk",
+ "version": "4.1.2",
+ "dependencies": [
+ "ansi-styles@4.3.0",
+ "supports-color@7.2.0"
+ ]
+ },
+ "check-error@1.0.2": {
+ "name": "check-error",
+ "version": "1.0.2",
+ "dependencies": []
+ },
+ "color-convert@2.0.1": {
+ "name": "color-convert",
+ "version": "2.0.1",
+ "dependencies": [
+ "color-name@1.1.4"
+ ]
+ },
+ "color-name@1.1.4": {
+ "name": "color-name",
+ "version": "1.1.4",
+ "dependencies": []
+ },
+ "deep-eql@3.0.1": {
+ "name": "deep-eql",
+ "version": "3.0.1",
+ "dependencies": [
+ "type-detect@4.0.8"
+ ]
+ },
+ "get-func-name@2.0.0": {
+ "name": "get-func-name",
+ "version": "2.0.0",
+ "dependencies": []
+ },
+ "has-flag@4.0.0": {
+ "name": "has-flag",
+ "version": "4.0.0",
+ "dependencies": []
+ },
+ "loupe@2.3.4": {
+ "name": "loupe",
+ "version": "2.3.4",
+ "dependencies": [
+ "get-func-name@2.0.0"
+ ]
+ },
+ "pathval@1.1.1": {
+ "name": "pathval",
+ "version": "1.1.1",
+ "dependencies": []
+ },
+ "supports-color@7.2.0": {
+ "name": "supports-color",
+ "version": "7.2.0",
+ "dependencies": [
+ "has-flag@4.0.0"
+ ]
+ },
+ "type-detect@4.0.8": {
+ "name": "type-detect",
+ "version": "4.0.8",
+ "dependencies": []
+ }
+ }
+}
diff --git a/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out
new file mode 100644
index 000000000..1ab367952
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_dir_with_deps/cjs_with_deps/main_node_modules.out
@@ -0,0 +1,47 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/chai
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/assertion-error
+Download http://localhost:4260/check-error
+Download http://localhost:4260/deep-eql
+Download http://localhost:4260/get-func-name
+Download http://localhost:4260/loupe
+Download http://localhost:4260/pathval
+Download http://localhost:4260/type-detect
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+[UNORDERED_END]
+[UNORDERED_START]
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Initialize ansi-styles@4.3.0
+Download http://localhost:4260/assertion-error/assertion-error-1.1.0.tgz
+Initialize assertion-error@1.1.0
+Download http://localhost:4260/chai/chai-4.3.6.tgz
+Initialize chai@4.3.6
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Initialize chalk@4.1.2
+Download http://localhost:4260/check-error/check-error-1.0.2.tgz
+Initialize check-error@1.0.2
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Initialize color-convert@2.0.1
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Initialize color-name@1.1.4
+Download http://localhost:4260/deep-eql/deep-eql-3.0.1.tgz
+Initialize deep-eql@3.0.1
+Download http://localhost:4260/get-func-name/get-func-name-2.0.0.tgz
+Initialize get-func-name@2.0.0
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Initialize has-flag@4.0.0
+Download http://localhost:4260/loupe/loupe-2.3.4.tgz
+Initialize loupe@2.3.4
+Download http://localhost:4260/pathval/pathval-1.1.1.tgz
+Initialize pathval@1.1.1
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Initialize supports-color@7.2.0
+Download http://localhost:4260/type-detect/type-detect-4.0.8.tgz
+Initialize type-detect@4.0.8
+[UNORDERED_END]
+chalk cjs loads
diff --git a/tests/specs/npm_tests/node_modules_dir_yargs/__test__.jsonc b/tests/specs/npm_tests/node_modules_dir_yargs/__test__.jsonc
new file mode 100644
index 000000000..8aa139a51
--- /dev/null
+++ b/tests/specs/npm_tests/node_modules_dir_yargs/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read --allow-env --node-modules-dir=auto cjs_yargs/main.js",
+ "output": "cjs_yargs/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/cjs_yargs/main.js b/tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.js
index 832fd053c..832fd053c 100644
--- a/tests/testdata/npm/cjs_yargs/main.js
+++ b/tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.js
diff --git a/tests/testdata/npm/cjs_yargs/main.out b/tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.out
index 938d7a771..938d7a771 100644
--- a/tests/testdata/npm/cjs_yargs/main.out
+++ b/tests/specs/npm_tests/node_modules_dir_yargs/cjs_yargs/main.out
diff --git a/tests/specs/npm_tests/non_existent_dep/__test__.jsonc b/tests/specs/npm_tests/non_existent_dep/__test__.jsonc
new file mode 100644
index 000000000..a43708421
--- /dev/null
+++ b/tests/specs/npm_tests/non_existent_dep/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "cache npm:@denotest/non-existent-dep",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1,
+ "output": "[UNORDERED_START]\nDownload http://localhost:4260/@denotest/non-existent-dep\nDownload http://localhost:4260/@denotest/non-existent\n[UNORDERED_END]\nerror: npm package '@denotest/non-existent' does not exist.\n"
+}
diff --git a/tests/specs/npm_tests/non_existent_dep_version/__test__.jsonc b/tests/specs/npm_tests/non_existent_dep_version/__test__.jsonc
new file mode 100644
index 000000000..19cd713e2
--- /dev/null
+++ b/tests/specs/npm_tests/non_existent_dep_version/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "cache npm:@denotest/non-existent-dep-version",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1,
+ "output": "[UNORDERED_START]\nDownload http://localhost:4260/@denotest/non-existent-dep-version\nDownload http://localhost:4260/@denotest/esm-basic\n[UNORDERED_END]\nerror: Could not find npm package '@denotest/esm-basic' matching '=99.99.99'.\n"
+}
diff --git a/tests/specs/npm_tests/nonexistent_file/__test__.jsonc b/tests/specs/npm_tests/nonexistent_file/__test__.jsonc
new file mode 100644
index 000000000..efbda98d2
--- /dev/null
+++ b/tests/specs/npm_tests/nonexistent_file/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run -A --quiet nonexistent_file/main.js",
+ "output": "nonexistent_file/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/nonexistent_file/main.js b/tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.js
index c480b0548..c480b0548 100644
--- a/tests/testdata/npm/nonexistent_file/main.js
+++ b/tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.js
diff --git a/tests/testdata/npm/nonexistent_file/main.out b/tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.out
index baa79b1ce..baa79b1ce 100644
--- a/tests/testdata/npm/nonexistent_file/main.out
+++ b/tests/specs/npm_tests/nonexistent_file/nonexistent_file/main.out
diff --git a/tests/specs/npm_tests/nonexistent_file_node_modules_dir/__test__.jsonc b/tests/specs/npm_tests/nonexistent_file_node_modules_dir/__test__.jsonc
new file mode 100644
index 000000000..28da47300
--- /dev/null
+++ b/tests/specs/npm_tests/nonexistent_file_node_modules_dir/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run -A --quiet --node-modules-dir nonexistent_file/main.js",
+ "output": "nonexistent_file/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.js b/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.js
new file mode 100644
index 000000000..c480b0548
--- /dev/null
+++ b/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.js
@@ -0,0 +1,2 @@
+import hmacSHA512 from "npm:crypto-js/non-existent";
+console.log(hmacSHA512);
diff --git a/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.out b/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.out
new file mode 100644
index 000000000..baa79b1ce
--- /dev/null
+++ b/tests/specs/npm_tests/nonexistent_file_node_modules_dir/nonexistent_file/main.out
@@ -0,0 +1,4 @@
+error: Unable to load [WILDCARD]non-existent imported from [WILDCARD]main.js
+
+Caused by:
+[WILDCARD]
diff --git a/tests/specs/npm_tests/permissions_outside_package/__test__.jsonc b/tests/specs/npm_tests/permissions_outside_package/__test__.jsonc
new file mode 100644
index 000000000..58f917f73
--- /dev/null
+++ b/tests/specs/npm_tests/permissions_outside_package/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read permissions_outside_package/main.ts",
+ "output": "permissions_outside_package/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/permissions_outside_package/foo/config.js b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/config.js
index e667790d2..e667790d2 100644
--- a/tests/testdata/npm/permissions_outside_package/foo/config.js
+++ b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/config.js
diff --git a/tests/testdata/npm/permissions_outside_package/foo/package.json b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/package.json
index cc049e6ce..cc049e6ce 100644
--- a/tests/testdata/npm/permissions_outside_package/foo/package.json
+++ b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/foo/package.json
diff --git a/tests/testdata/npm/permissions_outside_package/main.out b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.out
index 089f329c4..089f329c4 100644
--- a/tests/testdata/npm/permissions_outside_package/main.out
+++ b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.out
diff --git a/tests/testdata/npm/permissions_outside_package/main.ts b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.ts
index b0b82b626..934a3eebc 100644
--- a/tests/testdata/npm/permissions_outside_package/main.ts
+++ b/tests/specs/npm_tests/permissions_outside_package/permissions_outside_package/main.ts
@@ -1,5 +1,5 @@
import { loadConfigFile } from "npm:@denotest/permissions-outside-package";
-const fileName = `${Deno.cwd()}/npm/permissions_outside_package/foo/config.js`;
+const fileName = `${Deno.cwd()}/permissions_outside_package/foo/config.js`;
const config = loadConfigFile(fileName);
console.log(config);
diff --git a/tests/specs/npm_tests/remote_npm_specifier/__test__.jsonc b/tests/specs/npm_tests/remote_npm_specifier/__test__.jsonc
new file mode 100644
index 000000000..416024f0c
--- /dev/null
+++ b/tests/specs/npm_tests/remote_npm_specifier/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run --quiet -A remote_npm_specifier/main.ts",
+ "output": "remote_npm_specifier/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 0
+}
diff --git a/tests/testdata/npm/remote_npm_specifier/main.out b/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.out
index 9daeafb98..9daeafb98 100644
--- a/tests/testdata/npm/remote_npm_specifier/main.out
+++ b/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.out
diff --git a/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.ts b/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.ts
new file mode 100644
index 000000000..ea9442059
--- /dev/null
+++ b/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/main.ts
@@ -0,0 +1 @@
+import "./remote.ts";
diff --git a/tests/testdata/npm/remote_npm_specifier/remote.ts b/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/remote.ts
index 923ed3ed8..923ed3ed8 100644
--- a/tests/testdata/npm/remote_npm_specifier/remote.ts
+++ b/tests/specs/npm_tests/remote_npm_specifier/remote_npm_specifier/remote.ts
diff --git a/tests/specs/npm_tests/require_esm/__test__.jsonc b/tests/specs/npm_tests/require_esm/__test__.jsonc
new file mode 100644
index 000000000..83859c8f1
--- /dev/null
+++ b/tests/specs/npm_tests/require_esm/__test__.jsonc
@@ -0,0 +1,4 @@
+{
+ "args": "run --allow-read --quiet require_esm/main.ts",
+ "output": "require_esm/main.out"
+}
diff --git a/tests/specs/npm_tests/require_esm/require_esm/esm.js b/tests/specs/npm_tests/require_esm/require_esm/esm.js
new file mode 100644
index 000000000..0613f1911
--- /dev/null
+++ b/tests/specs/npm_tests/require_esm/require_esm/esm.js
@@ -0,0 +1 @@
+export class Test {}
diff --git a/tests/specs/npm_tests/require_esm/require_esm/main.out b/tests/specs/npm_tests/require_esm/require_esm/main.out
new file mode 100644
index 000000000..aab0d5c28
--- /dev/null
+++ b/tests/specs/npm_tests/require_esm/require_esm/main.out
@@ -0,0 +1 @@
+[Module: null prototype] { Test: [class Test] }
diff --git a/tests/specs/npm_tests/require_esm/require_esm/main.ts b/tests/specs/npm_tests/require_esm/require_esm/main.ts
new file mode 100644
index 000000000..67ac808f0
--- /dev/null
+++ b/tests/specs/npm_tests/require_esm/require_esm/main.ts
@@ -0,0 +1,5 @@
+import { createRequire } from "node:module";
+
+const require = createRequire(import.meta.url);
+
+console.log(require("./esm.js"));
diff --git a/tests/specs/npm_tests/require_json/__test__.jsonc b/tests/specs/npm_tests/require_json/__test__.jsonc
new file mode 100644
index 000000000..43af6230f
--- /dev/null
+++ b/tests/specs/npm_tests/require_json/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet require_json/main.js",
+ "output": "require_json/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/require_json/main.js b/tests/specs/npm_tests/require_json/require_json/main.js
index d11e85305..d11e85305 100644
--- a/tests/testdata/npm/require_json/main.js
+++ b/tests/specs/npm_tests/require_json/require_json/main.js
diff --git a/tests/testdata/npm/require_json/main.out b/tests/specs/npm_tests/require_json/require_json/main.out
index 97db68e1b..97db68e1b 100644
--- a/tests/testdata/npm/require_json/main.out
+++ b/tests/specs/npm_tests/require_json/require_json/main.out
diff --git a/tests/specs/npm_tests/reserved_word_exports/__test__.jsonc b/tests/specs/npm_tests/reserved_word_exports/__test__.jsonc
new file mode 100644
index 000000000..d2f6ae7c2
--- /dev/null
+++ b/tests/specs/npm_tests/reserved_word_exports/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run reserved_word_exports/main.ts",
+ "output": "reserved_word_exports/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/reserved_word_exports/main.out b/tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.out
index ccfd35bc8..ccfd35bc8 100644
--- a/tests/testdata/npm/reserved_word_exports/main.out
+++ b/tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.out
diff --git a/tests/testdata/npm/reserved_word_exports/main.ts b/tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.ts
index 33cf183d3..33cf183d3 100644
--- a/tests/testdata/npm/reserved_word_exports/main.ts
+++ b/tests/specs/npm_tests/reserved_word_exports/reserved_word_exports/main.ts
diff --git a/tests/specs/npm_tests/run_existing_npm_package_with_subpath/__test__.jsonc b/tests/specs/npm_tests/run_existing_npm_package_with_subpath/__test__.jsonc
new file mode 100644
index 000000000..bc76b00be
--- /dev/null
+++ b/tests/specs/npm_tests/run_existing_npm_package_with_subpath/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run --allow-read --node-modules-dir=auto npm:@denotest/bin/cli-esm dev --help",
+ "output": "run_existing_npm_package_with_subpath/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/run_existing_npm_package_with_subpath/main.out b/tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out
index f6ee03ef1..f6ee03ef1 100644
--- a/tests/testdata/npm/run_existing_npm_package_with_subpath/main.out
+++ b/tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/main.out
diff --git a/tests/testdata/npm/run_existing_npm_package_with_subpath/package.json b/tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/package.json
index e9a7e84ce..e9a7e84ce 100644
--- a/tests/testdata/npm/run_existing_npm_package_with_subpath/package.json
+++ b/tests/specs/npm_tests/run_existing_npm_package_with_subpath/run_existing_npm_package_with_subpath/package.json
diff --git a/tests/specs/npm_tests/sub_paths/__test__.jsonc b/tests/specs/npm_tests/sub_paths/__test__.jsonc
new file mode 100644
index 000000000..88ccbc3ac
--- /dev/null
+++ b/tests/specs/npm_tests/sub_paths/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet sub_paths/main.jsx",
+ "output": "sub_paths/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/sub_paths/main.jsx b/tests/specs/npm_tests/sub_paths/sub_paths/main.jsx
index 0c712b9ff..0c712b9ff 100644
--- a/tests/testdata/npm/sub_paths/main.jsx
+++ b/tests/specs/npm_tests/sub_paths/sub_paths/main.jsx
diff --git a/tests/testdata/npm/sub_paths/main.out b/tests/specs/npm_tests/sub_paths/sub_paths/main.out
index f034585a7..f034585a7 100644
--- a/tests/testdata/npm/sub_paths/main.out
+++ b/tests/specs/npm_tests/sub_paths/sub_paths/main.out
diff --git a/tests/specs/npm_tests/tarball_with_global_header/__test__.jsonc b/tests/specs/npm_tests/tarball_with_global_header/__test__.jsonc
new file mode 100644
index 000000000..7cf4a6083
--- /dev/null
+++ b/tests/specs/npm_tests/tarball_with_global_header/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet tarball_with_global_header/main.js",
+ "output": "tarball_with_global_header/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/tarball_with_global_header/main.js b/tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.js
index d1bb40fbc..d1bb40fbc 100644
--- a/tests/testdata/npm/tarball_with_global_header/main.js
+++ b/tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.js
diff --git a/tests/testdata/npm/tarball_with_global_header/main.out b/tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.out
index ff211087b..ff211087b 100644
--- a/tests/testdata/npm/tarball_with_global_header/main.out
+++ b/tests/specs/npm_tests/tarball_with_global_header/tarball_with_global_header/main.out
diff --git a/tests/specs/npm_tests/translate_cjs_to_esm/__test__.jsonc b/tests/specs/npm_tests/translate_cjs_to_esm/__test__.jsonc
new file mode 100644
index 000000000..e1344493c
--- /dev/null
+++ b/tests/specs/npm_tests/translate_cjs_to_esm/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "run -A --quiet translate_cjs_to_esm/main.js",
+ "output": "translate_cjs_to_esm/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/translate_cjs_to_esm/main.js b/tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.js
index 04a86fbf1..04a86fbf1 100644
--- a/tests/testdata/npm/translate_cjs_to_esm/main.js
+++ b/tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.js
diff --git a/tests/testdata/npm/translate_cjs_to_esm/main.out b/tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.out
index c21a965b8..c21a965b8 100644
--- a/tests/testdata/npm/translate_cjs_to_esm/main.out
+++ b/tests/specs/npm_tests/translate_cjs_to_esm/translate_cjs_to_esm/main.out
diff --git a/tests/specs/npm_tests/types_ambient_module/__test__.jsonc b/tests/specs/npm_tests/types_ambient_module/__test__.jsonc
new file mode 100644
index 000000000..fc60b3433
--- /dev/null
+++ b/tests/specs/npm_tests/types_ambient_module/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "check --quiet types_ambient_module/main.ts",
+ "output": "types_ambient_module/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/types_ambient_module/import_map.json b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/import_map.json
index f61d99b47..f61d99b47 100644
--- a/tests/testdata/npm/types_ambient_module/import_map.json
+++ b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/import_map.json
diff --git a/tests/testdata/npm/types_ambient_module/main.out b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.out
index c84130707..c84130707 100644
--- a/tests/testdata/npm/types_ambient_module/main.out
+++ b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.out
diff --git a/tests/testdata/npm/types_ambient_module/main.ts b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.ts
index 8f77cabe8..8f77cabe8 100644
--- a/tests/testdata/npm/types_ambient_module/main.ts
+++ b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main.ts
diff --git a/tests/testdata/npm/types_ambient_module/main_import_map.out b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.out
index 548f9b479..548f9b479 100644
--- a/tests/testdata/npm/types_ambient_module/main_import_map.out
+++ b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.out
diff --git a/tests/testdata/npm/types_ambient_module/main_import_map.ts b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.ts
index 2694c94b7..2694c94b7 100644
--- a/tests/testdata/npm/types_ambient_module/main_import_map.ts
+++ b/tests/specs/npm_tests/types_ambient_module/types_ambient_module/main_import_map.ts
diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/__test__.jsonc b/tests/specs/npm_tests/types_ambient_module_import_map/__test__.jsonc
new file mode 100644
index 000000000..2e8c9b60b
--- /dev/null
+++ b/tests/specs/npm_tests/types_ambient_module_import_map/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "check --quiet --import-map=types_ambient_module/import_map.json types_ambient_module/main_import_map.ts",
+ "output": "types_ambient_module/main_import_map.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/import_map.json b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/import_map.json
new file mode 100644
index 000000000..f61d99b47
--- /dev/null
+++ b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/import_map.json
@@ -0,0 +1,5 @@
+{
+ "imports": {
+ "types-ambient": "npm:@denotest/types-ambient"
+ }
+}
diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.out b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.out
new file mode 100644
index 000000000..c84130707
--- /dev/null
+++ b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.out
@@ -0,0 +1,21 @@
+error: TS2551 [ERROR]: Property 'Test2' does not exist on type 'typeof import("@denotest/types-ambient")'. Did you mean 'Test'?
+console.log(import1.Test2); // should error
+ ~~~~~
+ at file:///[WILDCARD]/types_ambient_module/main.ts:5:21
+
+ 'Test' is declared here.
+ class Test {
+ ~~~~
+ at file:///[WILDCARD]/@denotest/types-ambient/1.0.0/index.d.ts:7:9
+
+TS2551 [ERROR]: Property 'Test2' does not exist on type 'typeof import("@denotest/types-ambient")'. Did you mean 'Test'?
+console.log(import2.Test2); // should error
+ ~~~~~
+ at file:///[WILDCARD]/types_ambient_module/main.ts:7:21
+
+ 'Test' is declared here.
+ class Test {
+ ~~~~
+ at file:///[WILDCARD]/@denotest/types-ambient/1.0.0/index.d.ts:7:9
+
+Found 2 errors.
diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.ts b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.ts
new file mode 100644
index 000000000..8f77cabe8
--- /dev/null
+++ b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main.ts
@@ -0,0 +1,7 @@
+import * as import1 from "npm:@denotest/types-ambient";
+import * as import2 from "npm:@denotest/types-ambient@1";
+
+console.log(import1.Test);
+console.log(import1.Test2); // should error
+console.log(import2.Test);
+console.log(import2.Test2); // should error
diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.out b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.out
new file mode 100644
index 000000000..548f9b479
--- /dev/null
+++ b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.out
@@ -0,0 +1,9 @@
+error: TS2551 [ERROR]: Property 'Test2' does not exist on type 'typeof import("@denotest/types-ambient")'. Did you mean 'Test'?
+console.log(mod.Test2); // should error
+ ~~~~~
+ at file:///[WILDCARD]/main_import_map.ts:4:17
+
+ 'Test' is declared here.
+ class Test {
+ ~~~~
+ at file:///[WILDCARD]/@denotest/types-ambient/1.0.0/index.d.ts:7:9
diff --git a/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.ts b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.ts
new file mode 100644
index 000000000..2694c94b7
--- /dev/null
+++ b/tests/specs/npm_tests/types_ambient_module_import_map/types_ambient_module/main_import_map.ts
@@ -0,0 +1,4 @@
+import * as mod from "npm:@denotest/types-ambient";
+
+console.log(mod.Test);
+console.log(mod.Test2); // should error
diff --git a/tests/specs/npm_tests/types_d_ext/__test__.jsonc b/tests/specs/npm_tests/types_d_ext/__test__.jsonc
new file mode 100644
index 000000000..daa0f26ff
--- /dev/null
+++ b/tests/specs/npm_tests/types_d_ext/__test__.jsonc
@@ -0,0 +1,8 @@
+{
+ "args": "check --all d_ext/main.ts",
+ "output": "d_ext/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ }
+}
diff --git a/tests/testdata/npm/d_ext/main.out b/tests/specs/npm_tests/types_d_ext/d_ext/main.out
index 5c22a76a0..e99df6696 100644
--- a/tests/testdata/npm/d_ext/main.out
+++ b/tests/specs/npm_tests/types_d_ext/d_ext/main.out
@@ -1,3 +1,3 @@
Download http://localhost:4260/@denotest/d-ext
Download http://localhost:4260/@denotest/d-ext/1.0.0.tgz
-Check file:///[WILDCARD]/npm/d_ext/main.ts
+Check file:///[WILDCARD]/d_ext/main.ts
diff --git a/tests/testdata/npm/d_ext/main.ts b/tests/specs/npm_tests/types_d_ext/d_ext/main.ts
index c92dbe065..c92dbe065 100644
--- a/tests/testdata/npm/d_ext/main.ts
+++ b/tests/specs/npm_tests/types_d_ext/d_ext/main.ts
diff --git a/tests/specs/npm_tests/types_entry_value_not_exists/__test__.jsonc b/tests/specs/npm_tests/types_entry_value_not_exists/__test__.jsonc
new file mode 100644
index 000000000..1c2e8735f
--- /dev/null
+++ b/tests/specs/npm_tests/types_entry_value_not_exists/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "check --all types_entry_value_not_exists/main.ts",
+ "output": "types_entry_value_not_exists/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/types_entry_value_not_exists/main.out b/tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.out
index 017a17ea2..017a17ea2 100644
--- a/tests/testdata/npm/types_entry_value_not_exists/main.out
+++ b/tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.out
diff --git a/tests/testdata/npm/types_entry_value_not_exists/main.ts b/tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.ts
index 04374ef87..04374ef87 100644
--- a/tests/testdata/npm/types_entry_value_not_exists/main.ts
+++ b/tests/specs/npm_tests/types_entry_value_not_exists/types_entry_value_not_exists/main.ts
diff --git a/tests/specs/npm_tests/types_exports_import_types/__test__.jsonc b/tests/specs/npm_tests/types_exports_import_types/__test__.jsonc
new file mode 100644
index 000000000..fbb6a918a
--- /dev/null
+++ b/tests/specs/npm_tests/types_exports_import_types/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "check --all types_exports_import_types/main.ts",
+ "output": "types_exports_import_types/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/types_exports_import_types/main.out b/tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.out
index 10f9425ca..10f9425ca 100644
--- a/tests/testdata/npm/types_exports_import_types/main.out
+++ b/tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.out
diff --git a/tests/testdata/npm/types_exports_import_types/main.ts b/tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.ts
index 3ae3e92a3..3ae3e92a3 100644
--- a/tests/testdata/npm/types_exports_import_types/main.ts
+++ b/tests/specs/npm_tests/types_exports_import_types/types_exports_import_types/main.ts
diff --git a/tests/specs/npm_tests/types_no_types_entry/__test__.jsonc b/tests/specs/npm_tests/types_no_types_entry/__test__.jsonc
new file mode 100644
index 000000000..bae02f3a8
--- /dev/null
+++ b/tests/specs/npm_tests/types_no_types_entry/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "check --all types_no_types_entry/main.ts",
+ "output": "types_no_types_entry/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/types_no_types_entry/main.out b/tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.out
index 53e872eaf..53e872eaf 100644
--- a/tests/testdata/npm/types_no_types_entry/main.out
+++ b/tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.out
diff --git a/tests/testdata/npm/types_no_types_entry/main.ts b/tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.ts
index eef53b681..eef53b681 100644
--- a/tests/testdata/npm/types_no_types_entry/main.ts
+++ b/tests/specs/npm_tests/types_no_types_entry/types_no_types_entry/main.ts
diff --git a/tests/specs/npm_tests/typescript_file_in_package/__test__.jsonc b/tests/specs/npm_tests/typescript_file_in_package/__test__.jsonc
new file mode 100644
index 000000000..c5bd61ca2
--- /dev/null
+++ b/tests/specs/npm_tests/typescript_file_in_package/__test__.jsonc
@@ -0,0 +1,9 @@
+{
+ "args": "run typescript_file_in_package/main.ts",
+ "output": "typescript_file_in_package/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/testdata/npm/typescript_file_in_package/main.out b/tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.out
index 3c3b97190..3c3b97190 100644
--- a/tests/testdata/npm/typescript_file_in_package/main.out
+++ b/tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.out
diff --git a/tests/testdata/npm/typescript_file_in_package/main.ts b/tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.ts
index aefc38ebe..aefc38ebe 100644
--- a/tests/testdata/npm/typescript_file_in_package/main.ts
+++ b/tests/specs/npm_tests/typescript_file_in_package/typescript_file_in_package/main.ts
diff --git a/tests/testdata/npm/remote_npm_specifier/main.ts b/tests/testdata/npm/remote_npm_specifier/main.ts
deleted file mode 100644
index 20a99b688..000000000
--- a/tests/testdata/npm/remote_npm_specifier/main.ts
+++ /dev/null
@@ -1 +0,0 @@
-import "http://localhost:4545/npm/remote_npm_specifier/remote.ts";
diff --git a/tools/lint.js b/tools/lint.js
index 6cb27f8dc..04e72c4c9 100755
--- a/tools/lint.js
+++ b/tools/lint.js
@@ -214,7 +214,7 @@ async function ensureNoNewITests() {
"lsp_tests.rs": 0,
"node_compat_tests.rs": 0,
"node_unit_tests.rs": 2,
- "npm_tests.rs": 89,
+ "npm_tests.rs": 5,
"pm_tests.rs": 0,
"publish_tests.rs": 0,
"repl_tests.rs": 0,