summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-09-19 09:32:21 -0500
committerGitHub <noreply@github.com>2022-09-19 10:32:21 -0400
commit1464b756a4ef091ef97d1bf7340188ab5fe5492a (patch)
tree2eff346ccf5782c501460aec63a5028742066fa6
parent8d50c09c0db4e9b0644263cde3f7ff990ec75259 (diff)
refactor: move out test files from root testdata directory into sub directories (#15949)
-rw-r--r--.dprint.json6
-rw-r--r--cli/bench/main.rs27
-rw-r--r--cli/file_fetcher.rs10
-rw-r--r--cli/fs_util.rs12
-rw-r--r--cli/http_util.rs17
-rw-r--r--cli/tests/integration/bundle_tests.rs68
-rw-r--r--cli/tests/integration/cache_tests.rs24
-rw-r--r--cli/tests/integration/cert_tests.rs316
-rw-r--r--cli/tests/integration/check_tests.rs108
-rw-r--r--cli/tests/integration/compile_tests.rs30
-rw-r--r--cli/tests/integration/doc_tests.rs9
-rw-r--r--cli/tests/integration/eval_tests.rs14
-rw-r--r--cli/tests/integration/flags_tests.rs45
-rw-r--r--cli/tests/integration/fmt_tests.rs20
-rw-r--r--cli/tests/integration/info_tests.rs70
-rw-r--r--cli/tests/integration/lsp_tests.rs4
-rw-r--r--cli/tests/integration/mod.rs1139
-rw-r--r--cli/tests/integration/repl_tests.rs10
-rw-r--r--cli/tests/integration/run_tests.rs2023
-rw-r--r--cli/tests/integration/vendor_tests.rs1
-rw-r--r--cli/tests/integration/watcher_tests.rs20
-rw-r--r--cli/tests/integration/worker_tests.rs12
-rw-r--r--cli/tests/testdata/003_relative_import.ts3
-rw-r--r--cli/tests/testdata/014_duplicate_import.ts9
-rw-r--r--cli/tests/testdata/020_json_modules.ts2
-rw-r--r--cli/tests/testdata/021_mjs_modules.ts2
-rw-r--r--cli/tests/testdata/023_no_ext2
-rw-r--r--cli/tests/testdata/024_import_no_ext_with_headers.ts1
-rw-r--r--cli/tests/testdata/024_import_no_ext_with_headers.ts.out1
-rw-r--r--cli/tests/testdata/029_eval.out1
-rw-r--r--cli/tests/testdata/030_eval_ts.out1
-rw-r--r--cli/tests/testdata/035_cached_only_flag.out4
-rw-r--r--cli/tests/testdata/044_bad_resource.ts3
-rw-r--r--cli/tests/testdata/045_proxy_test.ts.out6
-rw-r--r--cli/tests/testdata/052_no_remote_flag.out4
-rw-r--r--cli/tests/testdata/053_import_compression/main.ts13
-rw-r--r--cli/tests/testdata/072_location_relative_fetch.ts2
-rw-r--r--cli/tests/testdata/084_worker_custom_inspect.ts4
-rw-r--r--cli/tests/testdata/Component.tsx1
-rw-r--r--cli/tests/testdata/assets/DenoWinRunner.cs (renamed from cli/tests/testdata/DenoWinRunner.cs)0
-rw-r--r--cli/tests/testdata/assets/DenoWinRunner.ps1 (renamed from cli/tests/testdata/DenoWinRunner.ps1)0
-rw-r--r--cli/tests/testdata/assets/deno_dom_0.1.3-alpha2.wasm (renamed from cli/tests/testdata/deno_dom_0.1.3-alpha2.wasm)bin616631 -> 616631 bytes
-rw-r--r--cli/tests/testdata/assets/fixture.json (renamed from cli/tests/testdata/fixture.json)0
-rw-r--r--cli/tests/testdata/assets/hello.txt (renamed from cli/tests/testdata/hello.txt)0
-rw-r--r--cli/tests/testdata/assets/unreachable.wasm (renamed from cli/tests/testdata/unreachable.wasm)bin42 -> 42 bytes
-rw-r--r--cli/tests/testdata/benches/response_string_perf.js (renamed from cli/tests/testdata/response_string_perf.js)0
-rw-r--r--cli/tests/testdata/benches/text_decoder_perf.js (renamed from cli/tests/testdata/text_decoder_perf.js)0
-rw-r--r--cli/tests/testdata/benches/text_encoder_into_perf.js (renamed from cli/tests/testdata/text_encoder_into_perf.js)0
-rw-r--r--cli/tests/testdata/benches/text_encoder_perf.js (renamed from cli/tests/testdata/text_encoder_perf.js)0
-rw-r--r--cli/tests/testdata/bundle/bare_imports/error_with_bare_import.ts (renamed from cli/tests/testdata/095_cache_with_bare_import.ts)0
-rw-r--r--cli/tests/testdata/bundle/bare_imports/error_with_bare_import.ts.out (renamed from cli/tests/testdata/error_027_bundle_with_bare_import.ts.out)2
-rw-r--r--cli/tests/testdata/bundle/bundle.test.out (renamed from cli/tests/testdata/bundle.test.out)0
-rw-r--r--cli/tests/testdata/bundle/check_local_by_default/no_errors.out (renamed from cli/tests/testdata/bundle/check_local_by_default.out)0
-rw-r--r--cli/tests/testdata/bundle/check_local_by_default/no_errors.ts (renamed from cli/tests/testdata/bundle/check_local_by_default.ts)0
-rw-r--r--cli/tests/testdata/bundle/check_local_by_default/type_error.out (renamed from cli/tests/testdata/bundle/check_local_by_default2.out)2
-rw-r--r--cli/tests/testdata/bundle/check_local_by_default/type_error.ts (renamed from cli/tests/testdata/bundle/check_local_by_default2.ts)0
-rw-r--r--cli/tests/testdata/bundle/decorators/ts_decorators.out (renamed from cli/tests/testdata/ts_decorators_bundle.out)0
-rw-r--r--cli/tests/testdata/bundle/decorators/ts_decorators.ts (renamed from cli/tests/testdata/ts_decorators_bundle.ts)2
-rw-r--r--cli/tests/testdata/bundle/dynamic_import.ts (renamed from cli/tests/testdata/bundle_dynamic_import.ts)0
-rw-r--r--cli/tests/testdata/bundle/ignore_directives.test.out (renamed from cli/tests/testdata/bundle_ignore_directives.test.out)0
-rw-r--r--cli/tests/testdata/bundle/import_map/import_map.json5
-rw-r--r--cli/tests/testdata/bundle/import_map/main.ts (renamed from cli/tests/testdata/bundle_im.ts)0
-rw-r--r--cli/tests/testdata/bundle/jsx.out (renamed from cli/tests/testdata/bundle_jsx.out)0
-rw-r--r--cli/tests/testdata/bundle/lockfile/check_error.json (renamed from cli/tests/testdata/lock_check_err_with_bundle.json)0
-rw-r--r--cli/tests/testdata/bundle/lockfile/check_error.out (renamed from cli/tests/testdata/lock_check_err_with_bundle.out)2
-rw-r--r--cli/tests/testdata/bundle_im.json5
-rw-r--r--cli/tests/testdata/cache/036_import_map_fetch.out (renamed from cli/tests/testdata/036_import_map_fetch.out)0
-rw-r--r--cli/tests/testdata/cache/037_fetch_multiple.out (renamed from cli/tests/testdata/037_fetch_multiple.out)0
-rw-r--r--cli/tests/testdata/cache/095_cache_with_bare_import.ts (renamed from cli/tests/testdata/error_027_bundle_with_bare_import.ts)0
-rw-r--r--cli/tests/testdata/cache/095_cache_with_bare_import.ts.out (renamed from cli/tests/testdata/095_cache_with_bare_import.ts.out)0
-rw-r--r--cli/tests/testdata/cache/cache_extensionless.out (renamed from cli/tests/testdata/cache_extensionless.out)0
-rw-r--r--cli/tests/testdata/cache/cache_random_extension.out (renamed from cli/tests/testdata/cache_random_extension.out)0
-rw-r--r--cli/tests/testdata/cache/ignore_require.js (renamed from cli/tests/testdata/ignore_require.js)0
-rw-r--r--cli/tests/testdata/cache/performance_stats.out (renamed from cli/tests/testdata/performance_stats.out)0
-rw-r--r--cli/tests/testdata/cache/redirect_cache.out (renamed from cli/tests/testdata/redirect_cache.out)0
-rw-r--r--cli/tests/testdata/cert/cafile_info.ts (renamed from cli/tests/testdata/cafile_info.ts)0
-rw-r--r--cli/tests/testdata/cert/cafile_info.ts.out (renamed from cli/tests/testdata/cafile_info.ts.out)2
-rw-r--r--cli/tests/testdata/cert/cafile_ts_fetch.ts (renamed from cli/tests/testdata/cafile_ts_fetch.ts)2
-rw-r--r--cli/tests/testdata/cert/cafile_ts_fetch.ts.out (renamed from cli/tests/testdata/cafile_ts_fetch.ts.out)0
-rw-r--r--cli/tests/testdata/cert/cafile_ts_fetch_unsafe_ssl.ts.out (renamed from cli/tests/testdata/cafile_ts_fetch_unsafe_ssl.ts.out)0
-rw-r--r--cli/tests/testdata/cert/cafile_url_imports.ts (renamed from cli/tests/testdata/cafile_url_imports.ts)0
-rw-r--r--cli/tests/testdata/cert/cafile_url_imports.ts.out (renamed from cli/tests/testdata/cafile_url_imports.ts.out)0
-rw-r--r--cli/tests/testdata/cert/cafile_url_imports_unsafe_ssl.ts.out (renamed from cli/tests/testdata/cafile_url_imports_unsafe_ssl.ts.out)0
-rw-r--r--cli/tests/testdata/cert/deno_land_unsafe_ssl.ts (renamed from cli/tests/testdata/deno_land_unsafe_ssl.ts)0
-rw-r--r--cli/tests/testdata/cert/deno_land_unsafe_ssl.ts.out (renamed from cli/tests/testdata/deno_land_unsafe_ssl.ts.out)0
-rw-r--r--cli/tests/testdata/cert/ip_address_unsafe_ssl.ts (renamed from cli/tests/testdata/ip_address_unsafe_ssl.ts)0
-rw-r--r--cli/tests/testdata/cert/ip_address_unsafe_ssl.ts.out (renamed from cli/tests/testdata/ip_address_unsafe_ssl.ts.out)0
-rw-r--r--cli/tests/testdata/cert/listen_tls_alpn.ts (renamed from cli/tests/testdata/listen_tls_alpn.ts)0
-rw-r--r--cli/tests/testdata/cert/listen_tls_alpn_fail.ts (renamed from cli/tests/testdata/listen_tls_alpn_fail.ts)2
-rw-r--r--cli/tests/testdata/cert/localhost_unsafe_ssl.ts.out (renamed from cli/tests/testdata/localhost_unsafe_ssl.ts.out)0
-rw-r--r--cli/tests/testdata/check/check_all.out (renamed from cli/tests/testdata/check_all.out)0
-rw-r--r--cli/tests/testdata/check/check_all.ts (renamed from cli/tests/testdata/check_all.ts)0
-rw-r--r--cli/tests/testdata/check/declaration_header_file_with_no_exports.ts (renamed from cli/tests/testdata/declaration_header_file_with_no_exports.ts)0
-rw-r--r--cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts (renamed from cli/tests/testdata/declaration_header_file_with_no_exports_js.d.ts)0
-rw-r--r--cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js (renamed from cli/tests/testdata/declaration_header_file_with_no_exports_js.js)0
-rw-r--r--cli/tests/testdata/check/module_detection_force.ts3
-rw-r--r--cli/tests/testdata/check/module_detection_force/import.ts (renamed from cli/tests/testdata/module_detection_force_import.ts)0
-rw-r--r--cli/tests/testdata/check/module_detection_force/main.ts3
-rw-r--r--cli/tests/testdata/circular1.js2
-rw-r--r--cli/tests/testdata/circular1.js.out2
-rw-r--r--cli/tests/testdata/circular2.js2
-rw-r--r--cli/tests/testdata/compile/args.ts (renamed from cli/tests/testdata/028_args.ts)0
-rw-r--r--cli/tests/testdata/compile/standalone_error.ts (renamed from cli/tests/testdata/standalone_error.ts)0
-rw-r--r--cli/tests/testdata/compile/standalone_error_module_with_imports_1.ts (renamed from cli/tests/testdata/standalone_error_module_with_imports_1.ts)0
-rw-r--r--cli/tests/testdata/compile/standalone_error_module_with_imports_2.ts (renamed from cli/tests/testdata/standalone_error_module_with_imports_2.ts)0
-rw-r--r--cli/tests/testdata/compile/standalone_follow_redirects.ts (renamed from cli/tests/testdata/standalone_follow_redirects.ts)0
-rw-r--r--cli/tests/testdata/compile/standalone_follow_redirects_2.js (renamed from cli/tests/testdata/standalone_follow_redirects_2.js)0
-rw-r--r--cli/tests/testdata/compile/standalone_import_datauri.ts (renamed from cli/tests/testdata/standalone_import_datauri.ts)0
-rw-r--r--cli/tests/testdata/compile/standalone_import_map.json5
-rw-r--r--cli/tests/testdata/compile/standalone_import_map.ts (renamed from cli/tests/testdata/standalone_import_map.ts)0
-rw-r--r--cli/tests/testdata/compile/standalone_runtime_flags.ts (renamed from cli/tests/testdata/standalone_runtime_flags.ts)0
-rw-r--r--cli/tests/testdata/config.ts.out4
-rw-r--r--cli/tests/testdata/config_json_import.ts2
-rw-r--r--cli/tests/testdata/config_types_remote.tsconfig.json7
-rw-r--r--cli/tests/testdata/disallow_http_from_https_js.out3
-rw-r--r--cli/tests/testdata/disallow_http_from_https_ts.out3
-rw-r--r--cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts (renamed from cli/tests/testdata/060_deno_doc_displays_all_overloads_in_details_view.ts)0
-rw-r--r--cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts.out (renamed from cli/tests/testdata/060_deno_doc_displays_all_overloads_in_details_view.ts.out)0
-rw-r--r--cli/tests/testdata/doc/deno_doc.ts (renamed from cli/tests/testdata/deno_doc.ts)0
-rw-r--r--cli/tests/testdata/doc/deno_doc_builtin.out (renamed from cli/tests/testdata/deno_doc_builtin.out)0
-rw-r--r--cli/tests/testdata/empty.out0
-rw-r--r--cli/tests/testdata/error_002.ts7
-rw-r--r--cli/tests/testdata/error_010_nonexistent_arg.disabled4
-rw-r--r--cli/tests/testdata/error_010_nonexistent_arg.out1
-rw-r--r--cli/tests/testdata/error_026_remote_import_error.ts1
-rw-r--r--cli/tests/testdata/error_026_remote_import_error.ts.out7
-rw-r--r--cli/tests/testdata/error_no_check.ts1
-rw-r--r--cli/tests/testdata/error_no_check.ts.out2
-rw-r--r--cli/tests/testdata/error_type_definitions.ts5
-rw-r--r--cli/tests/testdata/error_worker_permissions_local.ts4
-rw-r--r--cli/tests/testdata/eval/dyn_import_eval.out (renamed from cli/tests/testdata/041_dyn_import_eval.out)0
-rw-r--r--cli/tests/testdata/export_type_def.ts2
-rw-r--r--cli/tests/testdata/fix_emittable_skipped.js7
-rw-r--r--cli/tests/testdata/fix_js_import_js.ts3
-rw-r--r--cli/tests/testdata/fix_js_imports.ts3
-rw-r--r--cli/tests/testdata/fmt/badly_formatted.json (renamed from cli/tests/testdata/badly_formatted.json)0
-rw-r--r--cli/tests/testdata/fmt/badly_formatted.md (renamed from cli/tests/testdata/badly_formatted.md)0
-rw-r--r--cli/tests/testdata/fmt/badly_formatted.mjs (renamed from cli/tests/testdata/badly_formatted.mjs)0
-rw-r--r--cli/tests/testdata/fmt/badly_formatted_fixed.js (renamed from cli/tests/testdata/badly_formatted_fixed.js)0
-rw-r--r--cli/tests/testdata/fmt/badly_formatted_fixed.json (renamed from cli/tests/testdata/badly_formatted_fixed.json)0
-rw-r--r--cli/tests/testdata/fmt/badly_formatted_fixed.md (renamed from cli/tests/testdata/badly_formatted_fixed.md)0
-rw-r--r--cli/tests/testdata/fmt/with_config/subdir/a.ts2
-rw-r--r--cli/tests/testdata/fmt/with_config/subdir/b.ts4
-rw-r--r--cli/tests/testdata/import_meta2.ts1
-rw-r--r--cli/tests/testdata/info/031_info_ts_error.out (renamed from cli/tests/testdata/031_info_ts_error.out)0
-rw-r--r--cli/tests/testdata/info/031_info_ts_error.ts (renamed from cli/tests/testdata/031_info_ts_error.ts)0
-rw-r--r--cli/tests/testdata/info/041_info_flag.out (renamed from cli/tests/testdata/041_info_flag.out)0
-rw-r--r--cli/tests/testdata/info/041_info_flag_location.out (renamed from cli/tests/testdata/041_info_flag_location.out)0
-rw-r--r--cli/tests/testdata/info/049_info_flag_script_jsx.out (renamed from cli/tests/testdata/049_info_flag_script_jsx.out)2
-rw-r--r--cli/tests/testdata/info/054_info_local_imports.out (renamed from cli/tests/testdata/054_info_local_imports.out)0
-rw-r--r--cli/tests/testdata/info/065_import_map_info.out (renamed from cli/tests/testdata/065_import_map_info.out)0
-rw-r--r--cli/tests/testdata/info/076_info_json_deps_order.out (renamed from cli/tests/testdata/076_info_json_deps_order.out)0
-rw-r--r--cli/tests/testdata/info/076_info_json_deps_order.ts (renamed from cli/tests/testdata/076_info_json_deps_order.ts)0
-rw-r--r--cli/tests/testdata/info/error_009_missing_js_module.js (renamed from cli/tests/testdata/error_009_missing_js_module.js)0
-rw-r--r--cli/tests/testdata/info/error_009_missing_js_module.js.out (renamed from cli/tests/testdata/error_009_missing_js_module.js.out)0
-rw-r--r--cli/tests/testdata/info/info_json.out (renamed from cli/tests/testdata/info_json.out)0
-rw-r--r--cli/tests/testdata/info/info_json_location.out (renamed from cli/tests/testdata/info_json_location.out)0
-rw-r--r--cli/tests/testdata/info/info_missing_module.out (renamed from cli/tests/testdata/info_missing_module.out)0
-rw-r--r--cli/tests/testdata/info/info_recursive_imports_test.out (renamed from cli/tests/testdata/info_recursive_imports_test.out)0
-rw-r--r--cli/tests/testdata/info/info_recursive_imports_test.ts (renamed from cli/tests/testdata/info_recursive_imports_test.ts)0
-rw-r--r--cli/tests/testdata/info/info_type_import.out (renamed from cli/tests/testdata/info_type_import.out)0
-rw-r--r--cli/tests/testdata/info/info_type_import.ts3
-rw-r--r--cli/tests/testdata/info/json_output/main.out (renamed from cli/tests/testdata/055_info_file_json.out)10
-rw-r--r--cli/tests/testdata/info/json_output/main.ts11
-rw-r--r--cli/tests/testdata/info/multiple_imports.out (renamed from cli/tests/testdata/022_info_flag_script.out)2
-rw-r--r--cli/tests/testdata/info/recursive_imports/A.ts (renamed from cli/tests/testdata/recursive_imports/A.ts)0
-rw-r--r--cli/tests/testdata/info/recursive_imports/B.ts (renamed from cli/tests/testdata/recursive_imports/B.ts)0
-rw-r--r--cli/tests/testdata/info/recursive_imports/C.ts (renamed from cli/tests/testdata/recursive_imports/C.ts)0
-rw-r--r--cli/tests/testdata/info/recursive_imports/common.ts (renamed from cli/tests/testdata/recursive_imports/common.ts)0
-rw-r--r--cli/tests/testdata/info_type_import.ts3
-rw-r--r--cli/tests/testdata/inline_js_source_map_2.js4
-rw-r--r--cli/tests/testdata/inline_js_source_map_2.js.out2
-rw-r--r--cli/tests/testdata/inline_js_source_map_2_with_inline_contents.js4
-rw-r--r--cli/tests/testdata/inline_js_source_map_2_with_inline_contents.js.out2
-rw-r--r--cli/tests/testdata/inline_js_source_map_with_contents_from_graph.js4
-rw-r--r--cli/tests/testdata/issue13562.ts3
-rw-r--r--cli/tests/testdata/lock_check_err.out3
-rw-r--r--cli/tests/testdata/lsp/code_action_redirect_response.json6
-rw-r--r--cli/tests/testdata/lsp/x_deno_warning_redirect.js (renamed from cli/tests/testdata/x_deno_warning_redirect.js)0
-rw-r--r--cli/tests/testdata/main_module.ts3
-rw-r--r--cli/tests/testdata/main_module.ts.out2
-rw-r--r--cli/tests/testdata/main_module2.ts1
-rw-r--r--cli/tests/testdata/module_detection_force.ts3
-rw-r--r--cli/tests/testdata/nested_error.ts.out4
-rw-r--r--cli/tests/testdata/no_color.js1
-rw-r--r--cli/tests/testdata/raw_mode.ts18
-rw-r--r--cli/tests/testdata/repl/import_type.ts (renamed from cli/tests/testdata/import_type.ts)0
-rw-r--r--cli/tests/testdata/run/001_hello.js (renamed from cli/tests/testdata/001_hello.js)0
-rw-r--r--cli/tests/testdata/run/001_hello.js.out (renamed from cli/tests/testdata/001_hello.js.out)0
-rw-r--r--cli/tests/testdata/run/002_hello.ts (renamed from cli/tests/testdata/002_hello.ts)0
-rw-r--r--cli/tests/testdata/run/002_hello.ts.out (renamed from cli/tests/testdata/002_hello.ts.out)0
-rw-r--r--cli/tests/testdata/run/003_relative_import.ts3
-rw-r--r--cli/tests/testdata/run/003_relative_import.ts.out (renamed from cli/tests/testdata/003_relative_import.ts.out)0
-rw-r--r--cli/tests/testdata/run/004_set_timeout.ts (renamed from cli/tests/testdata/004_set_timeout.ts)0
-rw-r--r--cli/tests/testdata/run/004_set_timeout.ts.out (renamed from cli/tests/testdata/004_set_timeout.ts.out)0
-rw-r--r--cli/tests/testdata/run/005_more_imports.ts (renamed from cli/tests/testdata/005_more_imports.ts)2
-rw-r--r--cli/tests/testdata/run/005_more_imports.ts.out (renamed from cli/tests/testdata/005_more_imports.ts.out)0
-rw-r--r--cli/tests/testdata/run/006_url_imports.ts (renamed from cli/tests/testdata/006_url_imports.ts)0
-rw-r--r--cli/tests/testdata/run/006_url_imports.ts.out (renamed from cli/tests/testdata/006_url_imports.ts.out)0
-rw-r--r--cli/tests/testdata/run/012_async.ts (renamed from cli/tests/testdata/012_async.ts)0
-rw-r--r--cli/tests/testdata/run/012_async.ts.out (renamed from cli/tests/testdata/012_async.ts.out)0
-rw-r--r--cli/tests/testdata/run/013_dynamic_import.ts (renamed from cli/tests/testdata/013_dynamic_import.ts)2
-rw-r--r--cli/tests/testdata/run/013_dynamic_import.ts.out (renamed from cli/tests/testdata/013_dynamic_import.ts.out)0
-rw-r--r--cli/tests/testdata/run/014_duplicate_import.ts9
-rw-r--r--cli/tests/testdata/run/014_duplicate_import.ts.out (renamed from cli/tests/testdata/014_duplicate_import.ts.out)0
-rw-r--r--cli/tests/testdata/run/015_duplicate_parallel_import.js (renamed from cli/tests/testdata/015_duplicate_parallel_import.js)2
-rw-r--r--cli/tests/testdata/run/015_duplicate_parallel_import.js.out (renamed from cli/tests/testdata/015_duplicate_parallel_import.js.out)0
-rw-r--r--cli/tests/testdata/run/016_double_await.ts (renamed from cli/tests/testdata/016_double_await.ts)0
-rw-r--r--cli/tests/testdata/run/016_double_await.ts.out (renamed from cli/tests/testdata/016_double_await.ts.out)0
-rw-r--r--cli/tests/testdata/run/017_import_redirect.ts (renamed from cli/tests/testdata/017_import_redirect.ts)0
-rw-r--r--cli/tests/testdata/run/017_import_redirect.ts.out (renamed from cli/tests/testdata/017_import_redirect.ts.out)0
-rw-r--r--cli/tests/testdata/run/017_import_redirect_info.out (renamed from cli/tests/testdata/017_import_redirect_info.out)0
-rw-r--r--cli/tests/testdata/run/018_async_catch.ts (renamed from cli/tests/testdata/018_async_catch.ts)0
-rw-r--r--cli/tests/testdata/run/018_async_catch.ts.out (renamed from cli/tests/testdata/018_async_catch.ts.out)0
-rw-r--r--cli/tests/testdata/run/019_media_types.ts (renamed from cli/tests/testdata/019_media_types.ts)0
-rw-r--r--cli/tests/testdata/run/019_media_types.ts.out (renamed from cli/tests/testdata/019_media_types.ts.out)0
-rw-r--r--cli/tests/testdata/run/020_json_modules.ts2
-rw-r--r--cli/tests/testdata/run/020_json_modules.ts.out (renamed from cli/tests/testdata/020_json_modules.ts.out)0
-rw-r--r--cli/tests/testdata/run/021_mjs_modules.ts2
-rw-r--r--cli/tests/testdata/run/021_mjs_modules.ts.out (renamed from cli/tests/testdata/021_mjs_modules.ts.out)0
-rw-r--r--cli/tests/testdata/run/023_no_ext2
-rw-r--r--cli/tests/testdata/run/023_no_ext.out (renamed from cli/tests/testdata/023_no_ext.out)0
-rw-r--r--cli/tests/testdata/run/025_hrtime.ts (renamed from cli/tests/testdata/025_hrtime.ts)0
-rw-r--r--cli/tests/testdata/run/025_hrtime.ts.out (renamed from cli/tests/testdata/025_hrtime.ts.out)0
-rw-r--r--cli/tests/testdata/run/025_reload_js_type_error.js (renamed from cli/tests/testdata/025_reload_js_type_error.js)0
-rw-r--r--cli/tests/testdata/run/025_reload_js_type_error.js.out (renamed from cli/tests/testdata/025_reload_js_type_error.js.out)0
-rw-r--r--cli/tests/testdata/run/026_redirect_javascript.js (renamed from cli/tests/testdata/026_redirect_javascript.js)0
-rw-r--r--cli/tests/testdata/run/026_redirect_javascript.js.out (renamed from cli/tests/testdata/026_redirect_javascript.js.out)0
-rw-r--r--cli/tests/testdata/run/027_redirect_typescript.ts (renamed from cli/tests/testdata/027_redirect_typescript.ts)0
-rw-r--r--cli/tests/testdata/run/027_redirect_typescript.ts.out (renamed from cli/tests/testdata/027_redirect_typescript.ts.out)0
-rw-r--r--cli/tests/testdata/run/028_args.ts3
-rw-r--r--cli/tests/testdata/run/028_args.ts.out (renamed from cli/tests/testdata/028_args.ts.out)0
-rw-r--r--cli/tests/testdata/run/033_import_map.out (renamed from cli/tests/testdata/033_import_map.out)0
-rw-r--r--cli/tests/testdata/run/033_import_map_remote.out (renamed from cli/tests/testdata/033_import_map_remote.out)0
-rw-r--r--cli/tests/testdata/run/035_cached_only_flag.out4
-rw-r--r--cli/tests/testdata/run/038_checkjs.js (renamed from cli/tests/testdata/038_checkjs.js)0
-rw-r--r--cli/tests/testdata/run/038_checkjs.js.out (renamed from cli/tests/testdata/038_checkjs.js.out)0
-rw-r--r--cli/tests/testdata/run/042_dyn_import_evalcontext.ts (renamed from cli/tests/testdata/042_dyn_import_evalcontext.ts)0
-rw-r--r--cli/tests/testdata/run/042_dyn_import_evalcontext.ts.out (renamed from cli/tests/testdata/042_dyn_import_evalcontext.ts.out)0
-rw-r--r--cli/tests/testdata/run/044_bad_resource.ts3
-rw-r--r--cli/tests/testdata/run/044_bad_resource.ts.out (renamed from cli/tests/testdata/044_bad_resource.ts.out)0
-rw-r--r--cli/tests/testdata/run/045_mod.ts (renamed from cli/tests/testdata/045_mod.ts)0
-rw-r--r--cli/tests/testdata/run/045_output.ts (renamed from cli/tests/testdata/045_output.ts)0
-rw-r--r--cli/tests/testdata/run/045_programmatic_proxy_client.ts (renamed from cli/tests/testdata/045_programmatic_proxy_client.ts)2
-rw-r--r--cli/tests/testdata/run/045_proxy_client.ts (renamed from cli/tests/testdata/045_proxy_client.ts)2
-rw-r--r--cli/tests/testdata/run/045_proxy_test.ts (renamed from cli/tests/testdata/045_proxy_test.ts)14
-rw-r--r--cli/tests/testdata/run/045_proxy_test.ts.out6
-rw-r--r--cli/tests/testdata/run/046_jsx_test.tsx (renamed from cli/tests/testdata/046_jsx_test.tsx)0
-rw-r--r--cli/tests/testdata/run/046_jsx_test.tsx.out (renamed from cli/tests/testdata/046_jsx_test.tsx.out)0
-rw-r--r--cli/tests/testdata/run/047_jsx_test.jsx (renamed from cli/tests/testdata/047_jsx_test.jsx)0
-rw-r--r--cli/tests/testdata/run/047_jsx_test.jsx.out (renamed from cli/tests/testdata/047_jsx_test.jsx.out)0
-rw-r--r--cli/tests/testdata/run/048_media_types_jsx.ts (renamed from cli/tests/testdata/048_media_types_jsx.ts)0
-rw-r--r--cli/tests/testdata/run/048_media_types_jsx.ts.out (renamed from cli/tests/testdata/048_media_types_jsx.ts.out)0
-rw-r--r--cli/tests/testdata/run/052_no_remote_flag.out4
-rw-r--r--cli/tests/testdata/run/056_make_temp_file_write_perm.out (renamed from cli/tests/testdata/056_make_temp_file_write_perm.out)0
-rw-r--r--cli/tests/testdata/run/056_make_temp_file_write_perm.ts (renamed from cli/tests/testdata/056_make_temp_file_write_perm.ts)0
-rw-r--r--cli/tests/testdata/run/058_tasks_microtasks_close.ts (renamed from cli/tests/testdata/058_tasks_microtasks_close.ts)0
-rw-r--r--cli/tests/testdata/run/058_tasks_microtasks_close.ts.out (renamed from cli/tests/testdata/058_tasks_microtasks_close.ts.out)0
-rw-r--r--cli/tests/testdata/run/059_fs_relative_path_perm.ts (renamed from cli/tests/testdata/059_fs_relative_path_perm.ts)0
-rw-r--r--cli/tests/testdata/run/059_fs_relative_path_perm.ts.out (renamed from cli/tests/testdata/059_fs_relative_path_perm.ts.out)0
-rw-r--r--cli/tests/testdata/run/061_permissions_request.ts (renamed from cli/tests/testdata/061_permissions_request.ts)0
-rw-r--r--cli/tests/testdata/run/062_permissions_request_global.ts (renamed from cli/tests/testdata/062_permissions_request_global.ts)0
-rw-r--r--cli/tests/testdata/run/063_permissions_revoke.ts (renamed from cli/tests/testdata/063_permissions_revoke.ts)0
-rw-r--r--cli/tests/testdata/run/063_permissions_revoke.ts.out (renamed from cli/tests/testdata/063_permissions_revoke.ts.out)0
-rw-r--r--cli/tests/testdata/run/064_permissions_revoke_global.ts (renamed from cli/tests/testdata/064_permissions_revoke_global.ts)0
-rw-r--r--cli/tests/testdata/run/064_permissions_revoke_global.ts.out (renamed from cli/tests/testdata/064_permissions_revoke_global.ts.out)0
-rw-r--r--cli/tests/testdata/run/066_prompt.ts (renamed from cli/tests/testdata/066_prompt.ts)0
-rw-r--r--cli/tests/testdata/run/070_location.ts (renamed from cli/tests/testdata/070_location.ts)0
-rw-r--r--cli/tests/testdata/run/070_location.ts.out (renamed from cli/tests/testdata/070_location.ts.out)0
-rw-r--r--cli/tests/testdata/run/071_location_unset.ts (renamed from cli/tests/testdata/071_location_unset.ts)0
-rw-r--r--cli/tests/testdata/run/071_location_unset.ts.out (renamed from cli/tests/testdata/071_location_unset.ts.out)0
-rw-r--r--cli/tests/testdata/run/072_location_relative_fetch.ts2
-rw-r--r--cli/tests/testdata/run/072_location_relative_fetch.ts.out (renamed from cli/tests/testdata/072_location_relative_fetch.ts.out)0
-rw-r--r--cli/tests/testdata/run/075_import_local_query_hash.ts (renamed from cli/tests/testdata/075_import_local_query_hash.ts)0
-rw-r--r--cli/tests/testdata/run/075_import_local_query_hash.ts.out (renamed from cli/tests/testdata/075_import_local_query_hash.ts.out)0
-rw-r--r--cli/tests/testdata/run/077_fetch_empty.ts (renamed from cli/tests/testdata/077_fetch_empty.ts)0
-rw-r--r--cli/tests/testdata/run/077_fetch_empty.ts.out (renamed from cli/tests/testdata/077_fetch_empty.ts.out)0
-rw-r--r--cli/tests/testdata/run/078_unload_on_exit.ts (renamed from cli/tests/testdata/078_unload_on_exit.ts)0
-rw-r--r--cli/tests/testdata/run/078_unload_on_exit.ts.out (renamed from cli/tests/testdata/078_unload_on_exit.ts.out)0
-rw-r--r--cli/tests/testdata/run/079_location_authentication.ts (renamed from cli/tests/testdata/079_location_authentication.ts)0
-rw-r--r--cli/tests/testdata/run/079_location_authentication.ts.out (renamed from cli/tests/testdata/079_location_authentication.ts.out)0
-rw-r--r--cli/tests/testdata/run/081_location_relative_fetch_redirect.ts (renamed from cli/tests/testdata/081_location_relative_fetch_redirect.ts)0
-rw-r--r--cli/tests/testdata/run/081_location_relative_fetch_redirect.ts.out (renamed from cli/tests/testdata/081_location_relative_fetch_redirect.ts.out)0
-rw-r--r--cli/tests/testdata/run/082_prepare_stack_trace_throw.js (renamed from cli/tests/testdata/082_prepare_stack_trace_throw.js)0
-rw-r--r--cli/tests/testdata/run/082_prepare_stack_trace_throw.js.out (renamed from cli/tests/testdata/082_prepare_stack_trace_throw.js.out)0
-rw-r--r--cli/tests/testdata/run/083_legacy_external_source_map.ts (renamed from cli/tests/testdata/083_legacy_external_source_map.ts)0
-rw-r--r--cli/tests/testdata/run/088_dynamic_import_already_evaluating.ts (renamed from cli/tests/testdata/088_dynamic_import_already_evaluating.ts)0
-rw-r--r--cli/tests/testdata/run/088_dynamic_import_already_evaluating.ts.out (renamed from cli/tests/testdata/088_dynamic_import_already_evaluating.ts.out)0
-rw-r--r--cli/tests/testdata/run/088_dynamic_import_target.ts (renamed from cli/tests/testdata/088_dynamic_import_target.ts)0
-rw-r--r--cli/tests/testdata/run/089_run_allow_list.ts (renamed from cli/tests/testdata/089_run_allow_list.ts)0
-rw-r--r--cli/tests/testdata/run/089_run_allow_list.ts.out (renamed from cli/tests/testdata/089_run_allow_list.ts.out)0
-rw-r--r--cli/tests/testdata/run/090_run_permissions_request.ts (renamed from cli/tests/testdata/090_run_permissions_request.ts)0
-rw-r--r--cli/tests/testdata/run/091_use_define_for_class_fields.ts (renamed from cli/tests/testdata/091_use_define_for_class_fields.ts)0
-rw-r--r--cli/tests/testdata/run/091_use_define_for_class_fields.ts.out (renamed from cli/tests/testdata/091_use_define_for_class_fields.ts.out)0
-rw-r--r--cli/tests/testdata/run/092_import_map_unmapped_bare_specifier.ts (renamed from cli/tests/testdata/092_import_map_unmapped_bare_specifier.ts)0
-rw-r--r--cli/tests/testdata/run/092_import_map_unmapped_bare_specifier.ts.out (renamed from cli/tests/testdata/092_import_map_unmapped_bare_specifier.ts.out)0
-rw-r--r--cli/tests/testdata/run/aggregate_error.out (renamed from cli/tests/testdata/aggregate_error.out)0
-rw-r--r--cli/tests/testdata/run/aggregate_error.ts (renamed from cli/tests/testdata/aggregate_error.ts)0
-rw-r--r--cli/tests/testdata/run/async_error.ts (renamed from cli/tests/testdata/async_error.ts)0
-rw-r--r--cli/tests/testdata/run/async_error.ts.out (renamed from cli/tests/testdata/async_error.ts.out)0
-rw-r--r--cli/tests/testdata/run/before_unload.js (renamed from cli/tests/testdata/before_unload.js)0
-rw-r--r--cli/tests/testdata/run/before_unload.js.out (renamed from cli/tests/testdata/before_unload.js.out)0
-rw-r--r--cli/tests/testdata/run/blob_gc_finalization.js (renamed from cli/tests/testdata/blob_gc_finalization.js)0
-rw-r--r--cli/tests/testdata/run/blob_gc_finalization.js.out (renamed from cli/tests/testdata/blob_gc_finalization.js.out)0
-rw-r--r--cli/tests/testdata/run/byte_order_mark.out (renamed from cli/tests/testdata/byte_order_mark.out)0
-rw-r--r--cli/tests/testdata/run/byte_order_mark.ts (renamed from cli/tests/testdata/byte_order_mark.ts)0
-rw-r--r--cli/tests/testdata/run/checkjs.tsconfig.json (renamed from cli/tests/testdata/checkjs.tsconfig.json)0
-rw-r--r--cli/tests/testdata/run/cjs_imports/commonjs.cjs (renamed from cli/tests/testdata/commonjs.cjs)0
-rw-r--r--cli/tests/testdata/run/cjs_imports/main.out (renamed from cli/tests/testdata/cjs_imports.ts.out)0
-rw-r--r--cli/tests/testdata/run/cjs_imports/main.ts (renamed from cli/tests/testdata/cjs_imports.ts)0
-rw-r--r--cli/tests/testdata/run/classic_workers_event_loop.js (renamed from cli/tests/testdata/classic_workers_event_loop.js)0
-rw-r--r--cli/tests/testdata/run/classic_workers_event_loop.js.out (renamed from cli/tests/testdata/classic_workers_event_loop.js.out)0
-rw-r--r--cli/tests/testdata/run/colors_without_globalThis.js (renamed from cli/tests/testdata/colors_without_globalThis.js)0
-rw-r--r--cli/tests/testdata/run/complex_error.ts (renamed from cli/tests/testdata/complex_error.ts)0
-rw-r--r--cli/tests/testdata/run/complex_error.ts.out (renamed from cli/tests/testdata/complex_error.ts.out)0
-rw-r--r--cli/tests/testdata/run/complex_permissions_test.ts (renamed from cli/tests/testdata/complex_permissions_test.ts)0
-rw-r--r--cli/tests/testdata/run/config/main.out4
-rw-r--r--cli/tests/testdata/run/config/main.ts (renamed from cli/tests/testdata/config.ts)0
-rw-r--r--cli/tests/testdata/run/config/tsconfig.json (renamed from cli/tests/testdata/config.tsconfig.json)0
-rw-r--r--cli/tests/testdata/run/config_json_import.ts2
-rw-r--r--cli/tests/testdata/run/config_json_import.ts.out (renamed from cli/tests/testdata/config_json_import.ts.out)0
-rw-r--r--cli/tests/testdata/run/config_types/main.out (renamed from cli/tests/testdata/config_types.ts.out)0
-rw-r--r--cli/tests/testdata/run/config_types/main.ts (renamed from cli/tests/testdata/config_types.ts)0
-rw-r--r--cli/tests/testdata/run/config_types/remote.tsconfig.json7
-rw-r--r--cli/tests/testdata/run/config_types/tsconfig.json (renamed from cli/tests/testdata/config_types.tsconfig.json)2
-rw-r--r--cli/tests/testdata/run/config_types/types.d.ts (renamed from cli/tests/testdata/subdir/types.d.ts)0
-rw-r--r--cli/tests/testdata/run/custom_inspect_url.js (renamed from cli/tests/testdata/custom_inspect_url.js)0
-rw-r--r--cli/tests/testdata/run/custom_inspect_url.js.out (renamed from cli/tests/testdata/custom_inspect_url.js.out)0
-rw-r--r--cli/tests/testdata/run/delete_window.js (renamed from cli/tests/testdata/delete_window.js)0
-rw-r--r--cli/tests/testdata/run/deno_exit_tampering.ts (renamed from cli/tests/testdata/deno_exit_tampering.ts)0
-rw-r--r--cli/tests/testdata/run/disallow_http_from_https.js (renamed from cli/tests/testdata/disallow_http_from_https.js)2
-rw-r--r--cli/tests/testdata/run/disallow_http_from_https.ts (renamed from cli/tests/testdata/disallow_http_from_https.ts)2
-rw-r--r--cli/tests/testdata/run/disallow_http_from_https_js.out3
-rw-r--r--cli/tests/testdata/run/disallow_http_from_https_ts.out3
-rw-r--r--cli/tests/testdata/run/dom_exception_formatting.ts (renamed from cli/tests/testdata/dom_exception_formatting.ts)0
-rw-r--r--cli/tests/testdata/run/dom_exception_formatting.ts.out (renamed from cli/tests/testdata/dom_exception_formatting.ts.out)0
-rw-r--r--cli/tests/testdata/run/dynamic_import_already_rejected/error_001.ts (renamed from cli/tests/testdata/error_001.ts)0
-rw-r--r--cli/tests/testdata/run/dynamic_import_already_rejected/main.out (renamed from cli/tests/testdata/086_dynamic_import_already_rejected.ts.out)0
-rw-r--r--cli/tests/testdata/run/dynamic_import_already_rejected/main.ts (renamed from cli/tests/testdata/086_dynamic_import_already_rejected.ts)0
-rw-r--r--cli/tests/testdata/run/dynamic_import_async_error/delayed_error.ts (renamed from cli/tests/testdata/delayed_error.ts)0
-rw-r--r--cli/tests/testdata/run/dynamic_import_async_error/main.out (renamed from cli/tests/testdata/085_dynamic_import_async_error.ts.out)0
-rw-r--r--cli/tests/testdata/run/dynamic_import_async_error/main.ts (renamed from cli/tests/testdata/085_dynamic_import_async_error.ts)0
-rw-r--r--cli/tests/testdata/run/dynamic_import_conditional.js (renamed from cli/tests/testdata/dynamic_import_conditional.js)0
-rw-r--r--cli/tests/testdata/run/dynamic_import_conditional.js.out (renamed from cli/tests/testdata/dynamic_import_conditional.js.out)0
-rw-r--r--cli/tests/testdata/run/empty.ts (renamed from cli/tests/testdata/subdir/empty.ts)0
-rw-r--r--cli/tests/testdata/run/error_001.ts9
-rw-r--r--cli/tests/testdata/run/error_001.ts.out (renamed from cli/tests/testdata/error_001.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_002.ts7
-rw-r--r--cli/tests/testdata/run/error_002.ts.out (renamed from cli/tests/testdata/error_002.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_003_typescript.ts (renamed from cli/tests/testdata/error_003_typescript.ts)0
-rw-r--r--cli/tests/testdata/run/error_003_typescript.ts.out (renamed from cli/tests/testdata/error_003_typescript.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_004_missing_module.ts (renamed from cli/tests/testdata/error_004_missing_module.ts)0
-rw-r--r--cli/tests/testdata/run/error_004_missing_module.ts.out (renamed from cli/tests/testdata/error_004_missing_module.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_005_missing_dynamic_import.ts (renamed from cli/tests/testdata/error_005_missing_dynamic_import.ts)0
-rw-r--r--cli/tests/testdata/run/error_005_missing_dynamic_import.ts.out (renamed from cli/tests/testdata/error_005_missing_dynamic_import.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_006_import_ext_failure.ts (renamed from cli/tests/testdata/error_006_import_ext_failure.ts)0
-rw-r--r--cli/tests/testdata/run/error_006_import_ext_failure.ts.out (renamed from cli/tests/testdata/error_006_import_ext_failure.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_007_any.ts (renamed from cli/tests/testdata/error_007_any.ts)0
-rw-r--r--cli/tests/testdata/run/error_007_any.ts.out (renamed from cli/tests/testdata/error_007_any.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_008_checkjs.js (renamed from cli/tests/testdata/error_008_checkjs.js)0
-rw-r--r--cli/tests/testdata/run/error_008_checkjs.js.out (renamed from cli/tests/testdata/error_008_checkjs.js.out)0
-rw-r--r--cli/tests/testdata/run/error_009_extensions_error.js (renamed from cli/tests/testdata/error_009_extensions_error.js)0
-rw-r--r--cli/tests/testdata/run/error_009_extensions_error.js.out (renamed from cli/tests/testdata/error_009_extensions_error.js.out)0
-rw-r--r--cli/tests/testdata/run/error_009_missing_js_module.disabled (renamed from cli/tests/testdata/error_009_missing_js_module.disabled)0
-rw-r--r--cli/tests/testdata/run/error_011_bad_module_specifier.ts (renamed from cli/tests/testdata/error_011_bad_module_specifier.ts)0
-rw-r--r--cli/tests/testdata/run/error_011_bad_module_specifier.ts.out (renamed from cli/tests/testdata/error_011_bad_module_specifier.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_012_bad_dynamic_import_specifier.ts (renamed from cli/tests/testdata/error_012_bad_dynamic_import_specifier.ts)0
-rw-r--r--cli/tests/testdata/run/error_012_bad_dynamic_import_specifier.ts.out (renamed from cli/tests/testdata/error_012_bad_dynamic_import_specifier.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_013_missing_script.out (renamed from cli/tests/testdata/error_013_missing_script.out)0
-rw-r--r--cli/tests/testdata/run/error_014_catch_dynamic_import_error.js (renamed from cli/tests/testdata/error_014_catch_dynamic_import_error.js)6
-rw-r--r--cli/tests/testdata/run/error_014_catch_dynamic_import_error.js.out (renamed from cli/tests/testdata/error_014_catch_dynamic_import_error.js.out)0
-rw-r--r--cli/tests/testdata/run/error_015_dynamic_import_permissions.js (renamed from cli/tests/testdata/error_015_dynamic_import_permissions.js)0
-rw-r--r--cli/tests/testdata/run/error_015_dynamic_import_permissions.out (renamed from cli/tests/testdata/error_015_dynamic_import_permissions.out)0
-rw-r--r--cli/tests/testdata/run/error_016_dynamic_import_permissions2.js (renamed from cli/tests/testdata/error_016_dynamic_import_permissions2.js)0
-rw-r--r--cli/tests/testdata/run/error_016_dynamic_import_permissions2.out (renamed from cli/tests/testdata/error_016_dynamic_import_permissions2.out)0
-rw-r--r--cli/tests/testdata/run/error_017_hide_long_source_ts.ts (renamed from cli/tests/testdata/error_017_hide_long_source_ts.ts)0
-rw-r--r--cli/tests/testdata/run/error_017_hide_long_source_ts.ts.out (renamed from cli/tests/testdata/error_017_hide_long_source_ts.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_018_hide_long_source_js.js (renamed from cli/tests/testdata/error_018_hide_long_source_js.js)0
-rw-r--r--cli/tests/testdata/run/error_018_hide_long_source_js.js.out (renamed from cli/tests/testdata/error_018_hide_long_source_js.js.out)0
-rw-r--r--cli/tests/testdata/run/error_019_stack_function.ts (renamed from cli/tests/testdata/error_019_stack_function.ts)0
-rw-r--r--cli/tests/testdata/run/error_019_stack_function.ts.out (renamed from cli/tests/testdata/error_019_stack_function.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_020_stack_constructor.ts (renamed from cli/tests/testdata/error_020_stack_constructor.ts)0
-rw-r--r--cli/tests/testdata/run/error_020_stack_constructor.ts.out (renamed from cli/tests/testdata/error_020_stack_constructor.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_021_stack_method.ts (renamed from cli/tests/testdata/error_021_stack_method.ts)0
-rw-r--r--cli/tests/testdata/run/error_021_stack_method.ts.out (renamed from cli/tests/testdata/error_021_stack_method.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_022_stack_custom_error.ts (renamed from cli/tests/testdata/error_022_stack_custom_error.ts)0
-rw-r--r--cli/tests/testdata/run/error_022_stack_custom_error.ts.out (renamed from cli/tests/testdata/error_022_stack_custom_error.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_023_stack_async.ts (renamed from cli/tests/testdata/error_023_stack_async.ts)0
-rw-r--r--cli/tests/testdata/run/error_023_stack_async.ts.out (renamed from cli/tests/testdata/error_023_stack_async.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_024_stack_promise_all.ts (renamed from cli/tests/testdata/error_024_stack_promise_all.ts)0
-rw-r--r--cli/tests/testdata/run/error_024_stack_promise_all.ts.out (renamed from cli/tests/testdata/error_024_stack_promise_all.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_025_tab_indent (renamed from cli/tests/testdata/error_025_tab_indent)0
-rw-r--r--cli/tests/testdata/run/error_025_tab_indent.out (renamed from cli/tests/testdata/error_025_tab_indent.out)0
-rw-r--r--cli/tests/testdata/run/error_026_remote_import_error.ts1
-rw-r--r--cli/tests/testdata/run/error_026_remote_import_error.ts.out7
-rw-r--r--cli/tests/testdata/run/error_cause.ts (renamed from cli/tests/testdata/error_cause.ts)0
-rw-r--r--cli/tests/testdata/run/error_cause.ts.out (renamed from cli/tests/testdata/error_cause.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_cause_recursive.ts (renamed from cli/tests/testdata/error_cause_recursive.ts)0
-rw-r--r--cli/tests/testdata/run/error_cause_recursive.ts.out (renamed from cli/tests/testdata/error_cause_recursive.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_for_await.ts (renamed from cli/tests/testdata/error_for_await.ts)0
-rw-r--r--cli/tests/testdata/run/error_for_await.ts.out (renamed from cli/tests/testdata/error_for_await.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_import_map_unable_to_load.out (renamed from cli/tests/testdata/error_import_map_unable_to_load.out)0
-rw-r--r--cli/tests/testdata/run/error_local_static_import_from_remote.js (renamed from cli/tests/testdata/error_local_static_import_from_remote.js)0
-rw-r--r--cli/tests/testdata/run/error_local_static_import_from_remote.js.out (renamed from cli/tests/testdata/error_local_static_import_from_remote.js.out)2
-rw-r--r--cli/tests/testdata/run/error_local_static_import_from_remote.ts (renamed from cli/tests/testdata/error_local_static_import_from_remote.ts)0
-rw-r--r--cli/tests/testdata/run/error_local_static_import_from_remote.ts.out (renamed from cli/tests/testdata/error_local_static_import_from_remote.ts.out)2
-rw-r--r--cli/tests/testdata/run/error_missing_module_named_import.ts (renamed from cli/tests/testdata/error_missing_module_named_import.ts)0
-rw-r--r--cli/tests/testdata/run/error_missing_module_named_import.ts.out (renamed from cli/tests/testdata/error_missing_module_named_import.ts.out)0
-rw-r--r--cli/tests/testdata/run/error_name_non_string.js (renamed from cli/tests/testdata/error_name_non_string.js)0
-rw-r--r--cli/tests/testdata/run/error_name_non_string.js.out (renamed from cli/tests/testdata/error_name_non_string.js.out)0
-rw-r--r--cli/tests/testdata/run/error_no_check.ts1
-rw-r--r--cli/tests/testdata/run/error_no_check.ts.out2
-rw-r--r--cli/tests/testdata/run/error_syntax.js (renamed from cli/tests/testdata/error_syntax.js)0
-rw-r--r--cli/tests/testdata/run/error_syntax.js.out (renamed from cli/tests/testdata/error_syntax.js.out)0
-rw-r--r--cli/tests/testdata/run/error_syntax_empty_trailing_line.mjs (renamed from cli/tests/testdata/error_syntax_empty_trailing_line.mjs)0
-rw-r--r--cli/tests/testdata/run/error_syntax_empty_trailing_line.mjs.out (renamed from cli/tests/testdata/error_syntax_empty_trailing_line.mjs.out)0
-rw-r--r--cli/tests/testdata/run/error_type_definitions.ts5
-rw-r--r--cli/tests/testdata/run/error_type_definitions.ts.out (renamed from cli/tests/testdata/error_type_definitions.ts.out)0
-rw-r--r--cli/tests/testdata/run/es_private_fields.js (renamed from cli/tests/testdata/es_private_fields.js)0
-rw-r--r--cli/tests/testdata/run/es_private_fields.js.out (renamed from cli/tests/testdata/es_private_fields.js.out)0
-rw-r--r--cli/tests/testdata/run/eval_context_throw_dom_exception.js (renamed from cli/tests/testdata/eval_context_throw_dom_exception.js)0
-rw-r--r--cli/tests/testdata/run/eval_context_throw_dom_exception.js.out (renamed from cli/tests/testdata/eval_context_throw_dom_exception.js.out)0
-rw-r--r--cli/tests/testdata/run/event_listener_error.ts (renamed from cli/tests/testdata/event_listener_error.ts)0
-rw-r--r--cli/tests/testdata/run/event_listener_error.ts.out (renamed from cli/tests/testdata/event_listener_error.ts.out)0
-rw-r--r--cli/tests/testdata/run/event_listener_error_handled.ts (renamed from cli/tests/testdata/event_listener_error_handled.ts)0
-rw-r--r--cli/tests/testdata/run/event_listener_error_handled.ts.out (renamed from cli/tests/testdata/event_listener_error_handled.ts.out)0
-rw-r--r--cli/tests/testdata/run/event_listener_error_immediate_exit.ts (renamed from cli/tests/testdata/event_listener_error_immediate_exit.ts)0
-rw-r--r--cli/tests/testdata/run/event_listener_error_immediate_exit.ts.out (renamed from cli/tests/testdata/event_listener_error_immediate_exit.ts.out)0
-rw-r--r--cli/tests/testdata/run/event_listener_error_immediate_exit_worker.ts (renamed from cli/tests/testdata/event_listener_error_immediate_exit_worker.ts)0
-rw-r--r--cli/tests/testdata/run/event_listener_error_immediate_exit_worker.ts.out (renamed from cli/tests/testdata/event_listener_error_immediate_exit_worker.ts.out)0
-rw-r--r--cli/tests/testdata/run/exec_path.ts (renamed from cli/tests/testdata/exec_path.ts)0
-rw-r--r--cli/tests/testdata/run/exit_error42.ts (renamed from cli/tests/testdata/exit_error42.ts)0
-rw-r--r--cli/tests/testdata/run/exit_error42.ts.out (renamed from cli/tests/testdata/exit_error42.ts.out)0
-rw-r--r--cli/tests/testdata/run/export_type_def.ts2
-rw-r--r--cli/tests/testdata/run/fetch/hello.txt (renamed from cli/tests/testdata/fetch/hello.txt)0
-rw-r--r--cli/tests/testdata/run/fetch/other.ts (renamed from cli/tests/testdata/fetch/other.ts)0
-rw-r--r--cli/tests/testdata/run/fetch/test.ts (renamed from cli/tests/testdata/fetch/test.ts)0
-rw-r--r--cli/tests/testdata/run/fetch_async_error_stack.ts (renamed from cli/tests/testdata/fetch_async_error_stack.ts)0
-rw-r--r--cli/tests/testdata/run/fetch_async_error_stack.ts.out (renamed from cli/tests/testdata/fetch_async_error_stack.ts.out)0
-rw-r--r--cli/tests/testdata/run/fetch_response_finalization.js (renamed from cli/tests/testdata/fetch_response_finalization.js)0
-rw-r--r--cli/tests/testdata/run/fetch_response_finalization.js.out (renamed from cli/tests/testdata/fetch_response_finalization.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_1.js (renamed from cli/tests/testdata/unstable_ffi_1.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_1.js.out (renamed from cli/tests/testdata/unstable_ffi_1.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_10.js (renamed from cli/tests/testdata/unstable_ffi_10.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_10.js.out (renamed from cli/tests/testdata/unstable_ffi_10.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_11.js (renamed from cli/tests/testdata/unstable_ffi_11.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_11.js.out (renamed from cli/tests/testdata/unstable_ffi_11.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_12.js (renamed from cli/tests/testdata/unstable_ffi_12.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_12.js.out (renamed from cli/tests/testdata/unstable_ffi_12.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_13.js (renamed from cli/tests/testdata/unstable_ffi_13.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_13.js.out (renamed from cli/tests/testdata/unstable_ffi_13.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_14.js (renamed from cli/tests/testdata/unstable_ffi_14.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_14.js.out (renamed from cli/tests/testdata/unstable_ffi_14.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_15.js (renamed from cli/tests/testdata/unstable_ffi_15.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_15.js.out (renamed from cli/tests/testdata/unstable_ffi_15.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_2.js (renamed from cli/tests/testdata/unstable_ffi_2.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_2.js.out (renamed from cli/tests/testdata/unstable_ffi_2.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_3.js (renamed from cli/tests/testdata/unstable_ffi_3.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_3.js.out (renamed from cli/tests/testdata/unstable_ffi_3.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_4.js (renamed from cli/tests/testdata/unstable_ffi_4.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_4.js.out (renamed from cli/tests/testdata/unstable_ffi_4.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_5.js (renamed from cli/tests/testdata/unstable_ffi_5.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_5.js.out (renamed from cli/tests/testdata/unstable_ffi_5.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_6.js (renamed from cli/tests/testdata/unstable_ffi_6.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_6.js.out (renamed from cli/tests/testdata/unstable_ffi_6.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_7.js (renamed from cli/tests/testdata/unstable_ffi_7.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_7.js.out (renamed from cli/tests/testdata/unstable_ffi_7.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_8.js (renamed from cli/tests/testdata/unstable_ffi_8.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_8.js.out (renamed from cli/tests/testdata/unstable_ffi_8.js.out)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_9.js (renamed from cli/tests/testdata/unstable_ffi_9.js)0
-rw-r--r--cli/tests/testdata/run/ffi/unstable_ffi_9.js.out (renamed from cli/tests/testdata/unstable_ffi_9.js.out)0
-rw-r--r--cli/tests/testdata/run/finalization_registry.js (renamed from cli/tests/testdata/finalization_registry.js)0
-rw-r--r--cli/tests/testdata/run/finalization_registry.js.out (renamed from cli/tests/testdata/finalization_registry.js.out)0
-rw-r--r--cli/tests/testdata/run/fix_dynamic_import_errors.js (renamed from cli/tests/testdata/fix_dynamic_import_errors.js)4
-rw-r--r--cli/tests/testdata/run/fix_dynamic_import_errors.js.out (renamed from cli/tests/testdata/fix_dynamic_import_errors.js.out)0
-rw-r--r--cli/tests/testdata/run/fix_emittable_skipped.js7
-rw-r--r--cli/tests/testdata/run/fix_emittable_skipped.ts.out (renamed from cli/tests/testdata/fix_emittable_skipped.ts.out)0
-rw-r--r--cli/tests/testdata/run/fix_exotic_specifiers.ts (renamed from cli/tests/testdata/fix_exotic_specifiers.ts)0
-rw-r--r--cli/tests/testdata/run/fix_exotic_specifiers.ts.out (renamed from cli/tests/testdata/fix_exotic_specifiers.ts.out)0
-rw-r--r--cli/tests/testdata/run/fix_js_import_js.ts3
-rw-r--r--cli/tests/testdata/run/fix_js_import_js.ts.out (renamed from cli/tests/testdata/fix_js_import_js.ts.out)0
-rw-r--r--cli/tests/testdata/run/fix_js_imports.ts3
-rw-r--r--cli/tests/testdata/run/fix_js_imports.ts.out (renamed from cli/tests/testdata/fix_js_imports.ts.out)0
-rw-r--r--cli/tests/testdata/run/fix_tsc_file_exists.out (renamed from cli/tests/testdata/fix_tsc_file_exists.out)0
-rw-r--r--cli/tests/testdata/run/fix_worker_dispatchevent.ts (renamed from cli/tests/testdata/fix_worker_dispatchevent.ts)0
-rw-r--r--cli/tests/testdata/run/fix_worker_dispatchevent.ts.out (renamed from cli/tests/testdata/fix_worker_dispatchevent.ts.out)0
-rw-r--r--cli/tests/testdata/run/followup_dyn_import_resolves/main.ts (renamed from cli/tests/testdata/followup_dyn_import_resolves/main.ts)0
-rw-r--r--cli/tests/testdata/run/followup_dyn_import_resolves/main.ts.out (renamed from cli/tests/testdata/followup_dyn_import_resolves/main.ts.out)0
-rw-r--r--cli/tests/testdata/run/followup_dyn_import_resolves/sub1.ts (renamed from cli/tests/testdata/followup_dyn_import_resolves/sub1.ts)0
-rw-r--r--cli/tests/testdata/run/followup_dyn_import_resolves/sub2.ts (renamed from cli/tests/testdata/followup_dyn_import_resolves/sub2.ts)0
-rw-r--r--cli/tests/testdata/run/future_check.ts (renamed from cli/tests/testdata/future_check.ts)0
-rw-r--r--cli/tests/testdata/run/future_check2.out (renamed from cli/tests/testdata/future_check2.out)0
-rw-r--r--cli/tests/testdata/run/heapstats.js (renamed from cli/tests/testdata/heapstats.js)0
-rw-r--r--cli/tests/testdata/run/heapstats.js.out (renamed from cli/tests/testdata/heapstats.js.out)0
-rw-r--r--cli/tests/testdata/run/http2_request_url.ts (renamed from cli/tests/testdata/http2_request_url.ts)0
-rw-r--r--cli/tests/testdata/run/https_import.ts (renamed from cli/tests/testdata/https_import.ts)0
-rw-r--r--cli/tests/testdata/run/https_import.ts.out (renamed from cli/tests/testdata/https_import.ts.out)0
-rw-r--r--cli/tests/testdata/run/if_main.ts (renamed from cli/tests/testdata/if_main.ts)0
-rw-r--r--cli/tests/testdata/run/if_main.ts.out (renamed from cli/tests/testdata/if_main.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_blob_url.ts (renamed from cli/tests/testdata/import_blob_url.ts)0
-rw-r--r--cli/tests/testdata/run/import_blob_url.ts.out (renamed from cli/tests/testdata/import_blob_url.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_blob_url_error_stack.ts (renamed from cli/tests/testdata/import_blob_url_error_stack.ts)0
-rw-r--r--cli/tests/testdata/run/import_blob_url_error_stack.ts.out (renamed from cli/tests/testdata/import_blob_url_error_stack.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_blob_url_import_relative.ts (renamed from cli/tests/testdata/import_blob_url_import_relative.ts)0
-rw-r--r--cli/tests/testdata/run/import_blob_url_import_relative.ts.out (renamed from cli/tests/testdata/import_blob_url_import_relative.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_blob_url_imports.ts (renamed from cli/tests/testdata/import_blob_url_imports.ts)0
-rw-r--r--cli/tests/testdata/run/import_blob_url_imports.ts.out (renamed from cli/tests/testdata/import_blob_url_imports.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_blob_url_jsx.ts (renamed from cli/tests/testdata/import_blob_url_jsx.ts)0
-rw-r--r--cli/tests/testdata/run/import_blob_url_jsx.ts.out (renamed from cli/tests/testdata/import_blob_url_jsx.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_compression/brotli (renamed from cli/tests/testdata/053_import_compression/brotli)0
-rw-r--r--cli/tests/testdata/run/import_compression/gziped (renamed from cli/tests/testdata/053_import_compression/gziped)bin39 -> 39 bytes
-rw-r--r--cli/tests/testdata/run/import_compression/main.out (renamed from cli/tests/testdata/053_import_compression.out)0
-rw-r--r--cli/tests/testdata/run/import_compression/main.ts13
-rw-r--r--cli/tests/testdata/run/import_data_url.ts (renamed from cli/tests/testdata/import_data_url.ts)0
-rw-r--r--cli/tests/testdata/run/import_data_url.ts.out (renamed from cli/tests/testdata/import_data_url.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_data_url_error_stack.ts (renamed from cli/tests/testdata/import_data_url_error_stack.ts)0
-rw-r--r--cli/tests/testdata/run/import_data_url_error_stack.ts.out (renamed from cli/tests/testdata/import_data_url_error_stack.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_data_url_import_relative.ts (renamed from cli/tests/testdata/import_data_url_import_relative.ts)0
-rw-r--r--cli/tests/testdata/run/import_data_url_import_relative.ts.out (renamed from cli/tests/testdata/import_data_url_import_relative.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_data_url_imports.ts (renamed from cli/tests/testdata/import_data_url_imports.ts)0
-rw-r--r--cli/tests/testdata/run/import_data_url_imports.ts.out (renamed from cli/tests/testdata/import_data_url_imports.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_data_url_jsx.ts (renamed from cli/tests/testdata/import_data_url_jsx.ts)0
-rw-r--r--cli/tests/testdata/run/import_data_url_jsx.ts.out (renamed from cli/tests/testdata/import_data_url_jsx.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_dynamic_data_url.ts (renamed from cli/tests/testdata/import_dynamic_data_url.ts)0
-rw-r--r--cli/tests/testdata/run/import_dynamic_data_url.ts.out (renamed from cli/tests/testdata/import_dynamic_data_url.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_extensionless.ts (renamed from cli/tests/testdata/import_extensionless.ts)0
-rw-r--r--cli/tests/testdata/run/import_extensionless.ts.out (renamed from cli/tests/testdata/import_extensionless.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_file_with_colon.ts (renamed from cli/tests/testdata/import_file_with_colon.ts)0
-rw-r--r--cli/tests/testdata/run/import_file_with_colon.ts.out (renamed from cli/tests/testdata/import_file_with_colon.ts.out)0
-rw-r--r--cli/tests/testdata/run/import_meta/importmap.json (renamed from cli/tests/testdata/import_meta.importmap.json)0
-rw-r--r--cli/tests/testdata/run/import_meta/main.out (renamed from cli/tests/testdata/import_meta.ts.out)4
-rw-r--r--cli/tests/testdata/run/import_meta/main.ts (renamed from cli/tests/testdata/import_meta.ts)6
-rw-r--r--cli/tests/testdata/run/import_meta/other.ts1
-rw-r--r--cli/tests/testdata/run/import_type.ts5
-rw-r--r--cli/tests/testdata/run/import_type.ts.out (renamed from cli/tests/testdata/import_type.ts.out)0
-rw-r--r--cli/tests/testdata/run/inline_js_source_map.ts (renamed from cli/tests/testdata/inline_js_source_map.ts)0
-rw-r--r--cli/tests/testdata/run/inline_js_source_map_2.js4
-rw-r--r--cli/tests/testdata/run/inline_js_source_map_2.js.out2
-rw-r--r--cli/tests/testdata/run/inline_js_source_map_2.ts (renamed from cli/tests/testdata/inline_js_source_map_2.ts)0
-rw-r--r--cli/tests/testdata/run/inline_js_source_map_2_with_inline_contents.js4
-rw-r--r--cli/tests/testdata/run/inline_js_source_map_2_with_inline_contents.js.out2
-rw-r--r--cli/tests/testdata/run/inline_js_source_map_with_contents_from_graph.js4
-rw-r--r--cli/tests/testdata/run/inline_js_source_map_with_contents_from_graph.js.out (renamed from cli/tests/testdata/inline_js_source_map_with_contents_from_graph.js.out)2
-rw-r--r--cli/tests/testdata/run/issue13562.ts3
-rw-r--r--cli/tests/testdata/run/issue13562.ts.out (renamed from cli/tests/testdata/issue13562.ts.out)0
-rw-r--r--cli/tests/testdata/run/issue9750.js (renamed from cli/tests/testdata/issue9750.js)0
-rw-r--r--cli/tests/testdata/run/js_import_detect.ts (renamed from cli/tests/testdata/js_import_detect.ts)0
-rw-r--r--cli/tests/testdata/run/js_import_detect.ts.out (renamed from cli/tests/testdata/js_import_detect.ts.out)0
-rw-r--r--cli/tests/testdata/run/js_root_with_ts_check.js (renamed from cli/tests/testdata/js_root_with_ts_check.js)0
-rw-r--r--cli/tests/testdata/run/js_root_with_ts_check.js.out (renamed from cli/tests/testdata/js_root_with_ts_check.js.out)0
-rw-r--r--cli/tests/testdata/run/jsx_import_from_ts.App.jsx (renamed from cli/tests/testdata/jsx_import_from_ts.App.jsx)0
-rw-r--r--cli/tests/testdata/run/jsx_import_from_ts.ts (renamed from cli/tests/testdata/jsx_import_from_ts.ts)0
-rw-r--r--cli/tests/testdata/run/jsx_import_from_ts.ts.out (renamed from cli/tests/testdata/jsx_import_from_ts.ts.out)0
-rw-r--r--cli/tests/testdata/run/jsx_import_source.out (renamed from cli/tests/testdata/jsx_import_source.out)0
-rw-r--r--cli/tests/testdata/run/jsx_import_source_dev.out (renamed from cli/tests/testdata/jsx_import_source_dev.out)0
-rw-r--r--cli/tests/testdata/run/jsx_import_source_error.out (renamed from cli/tests/testdata/jsx_import_source_error.out)0
-rw-r--r--cli/tests/testdata/run/jsx_import_source_import_map.out (renamed from cli/tests/testdata/jsx_import_source_import_map.out)0
-rw-r--r--cli/tests/testdata/run/jsx_import_source_import_map_dev.out (renamed from cli/tests/testdata/jsx_import_source_import_map_dev.out)0
-rw-r--r--cli/tests/testdata/run/jsx_import_source_no_pragma.tsx (renamed from cli/tests/testdata/jsx_import_source_no_pragma.tsx)0
-rw-r--r--cli/tests/testdata/run/jsx_import_source_pragma.tsx (renamed from cli/tests/testdata/jsx_import_source_pragma.tsx)0
-rw-r--r--cli/tests/testdata/run/jsx_import_source_pragma_import_map.tsx (renamed from cli/tests/testdata/jsx_import_source_pragma_import_map.tsx)0
-rw-r--r--cli/tests/testdata/run/lock_check_err.json (renamed from cli/tests/testdata/lock_check_err.json)2
-rw-r--r--cli/tests/testdata/run/lock_check_err.out3
-rw-r--r--cli/tests/testdata/run/lock_check_err2.json (renamed from cli/tests/testdata/lock_check_err2.json)0
-rw-r--r--cli/tests/testdata/run/lock_check_err2.out (renamed from cli/tests/testdata/lock_check_err2.out)2
-rw-r--r--cli/tests/testdata/run/lock_check_ok.json (renamed from cli/tests/testdata/lock_check_ok.json)2
-rw-r--r--cli/tests/testdata/run/lock_check_ok2.json (renamed from cli/tests/testdata/lock_check_ok2.json)0
-rw-r--r--cli/tests/testdata/run/lock_dynamic_imports.json (renamed from cli/tests/testdata/lock_dynamic_imports.json)2
-rw-r--r--cli/tests/testdata/run/lock_dynamic_imports.out (renamed from cli/tests/testdata/lock_dynamic_imports.out)2
-rw-r--r--cli/tests/testdata/run/lock_write_fetch/file_exists.ts (renamed from cli/tests/testdata/file_exists.ts)0
-rw-r--r--cli/tests/testdata/run/lock_write_fetch/main.out (renamed from cli/tests/testdata/lock_write_fetch.ts.out)0
-rw-r--r--cli/tests/testdata/run/lock_write_fetch/main.ts (renamed from cli/tests/testdata/lock_write_fetch.ts)6
-rw-r--r--cli/tests/testdata/run/lock_write_requires_lock.out (renamed from cli/tests/testdata/lock_write_requires_lock.out)0
-rw-r--r--cli/tests/testdata/run/long_data_url_formatting.ts (renamed from cli/tests/testdata/long_data_url_formatting.ts)0
-rw-r--r--cli/tests/testdata/run/long_data_url_formatting.ts.out (renamed from cli/tests/testdata/long_data_url_formatting.ts.out)0
-rw-r--r--cli/tests/testdata/run/main_module/main.out2
-rw-r--r--cli/tests/testdata/run/main_module/main.ts3
-rw-r--r--cli/tests/testdata/run/main_module/other.ts1
-rw-r--r--cli/tests/testdata/run/mts_dmts_mjs.out (renamed from cli/tests/testdata/mts_dmts_mjs.out)0
-rw-r--r--cli/tests/testdata/run/nested_error.ts (renamed from cli/tests/testdata/nested_error.ts)0
-rw-r--r--cli/tests/testdata/run/nested_error.ts.out4
-rw-r--r--cli/tests/testdata/run/no_check_decorators.ts (renamed from cli/tests/testdata/no_check_decorators.ts)0
-rw-r--r--cli/tests/testdata/run/no_check_decorators.ts.out (renamed from cli/tests/testdata/no_check_decorators.ts.out)0
-rw-r--r--cli/tests/testdata/run/no_check_imports_not_used_as_values/hello.ts (renamed from cli/tests/testdata/087_hello.ts)0
-rw-r--r--cli/tests/testdata/run/no_check_imports_not_used_as_values/main.out (renamed from cli/tests/testdata/087_no_check_imports_not_used_as_values.ts.out)0
-rw-r--r--cli/tests/testdata/run/no_check_imports_not_used_as_values/main.ts (renamed from cli/tests/testdata/087_no_check_imports_not_used_as_values.ts)2
-rw-r--r--cli/tests/testdata/run/no_check_imports_not_used_as_values/preserve_imports.tsconfig.json (renamed from cli/tests/testdata/preserve_imports.tsconfig.json)0
-rw-r--r--cli/tests/testdata/run/no_check_remote.ts (renamed from cli/tests/testdata/no_check_remote.ts)0
-rw-r--r--cli/tests/testdata/run/no_check_remote.ts.disabled.out (renamed from cli/tests/testdata/no_check_remote.ts.disabled.out)0
-rw-r--r--cli/tests/testdata/run/no_check_remote.ts.enabled.out (renamed from cli/tests/testdata/no_check_remote.ts.enabled.out)0
-rw-r--r--cli/tests/testdata/run/no_mem_cache.js (renamed from cli/tests/testdata/no_mem_cache.js)0
-rw-r--r--cli/tests/testdata/run/no_mem_cache.js.out (renamed from cli/tests/testdata/no_mem_cache.js.out)0
-rw-r--r--cli/tests/testdata/run/no_prompt.ts (renamed from cli/tests/testdata/no_prompt.ts)0
-rw-r--r--cli/tests/testdata/run/no_validate_asm.js (renamed from cli/tests/testdata/no_validate_asm.js)0
-rw-r--r--cli/tests/testdata/run/node_env_var_allowlist.ts (renamed from cli/tests/testdata/node_env_var_allowlist.ts)0
-rw-r--r--cli/tests/testdata/run/node_env_var_allowlist_with_unstable_flag.ts.out (renamed from cli/tests/testdata/node_env_var_allowlist_with_unstable_flag.ts.out)0
-rw-r--r--cli/tests/testdata/run/node_env_var_allowlist_without_unstable_flag.ts.out (renamed from cli/tests/testdata/node_env_var_allowlist_without_unstable_flag.ts.out)0
-rw-r--r--cli/tests/testdata/run/onload/imported.ts (renamed from cli/tests/testdata/034_onload/imported.ts)2
-rw-r--r--cli/tests/testdata/run/onload/main.out (renamed from cli/tests/testdata/034_onload.out)0
-rw-r--r--cli/tests/testdata/run/onload/main.ts (renamed from cli/tests/testdata/034_onload/main.ts)2
-rw-r--r--cli/tests/testdata/run/onload/nest_imported.ts (renamed from cli/tests/testdata/034_onload/nest_imported.ts)2
-rw-r--r--cli/tests/testdata/run/op_exit_op_set_exit_code_in_worker.ts (renamed from cli/tests/testdata/op_exit_op_set_exit_code_in_worker.ts)0
-rw-r--r--cli/tests/testdata/run/op_exit_op_set_exit_code_worker.js (renamed from cli/tests/testdata/op_exit_op_set_exit_code_worker.js)0
-rw-r--r--cli/tests/testdata/run/permission_test.ts (renamed from cli/tests/testdata/permission_test.ts)2
-rw-r--r--cli/tests/testdata/run/private_field_presence.ts (renamed from cli/tests/testdata/private_field_presence.ts)0
-rw-r--r--cli/tests/testdata/run/private_field_presence.ts.out (renamed from cli/tests/testdata/private_field_presence.ts.out)0
-rw-r--r--cli/tests/testdata/run/proto_exploit.js (renamed from cli/tests/testdata/proto_exploit.js)0
-rw-r--r--cli/tests/testdata/run/proto_exploit.js.out (renamed from cli/tests/testdata/proto_exploit.js.out)0
-rw-r--r--cli/tests/testdata/run/queue_microtask_error.ts (renamed from cli/tests/testdata/queue_microtask_error.ts)0
-rw-r--r--cli/tests/testdata/run/queue_microtask_error.ts.out (renamed from cli/tests/testdata/queue_microtask_error.ts.out)0
-rw-r--r--cli/tests/testdata/run/queue_microtask_error_handled.ts (renamed from cli/tests/testdata/queue_microtask_error_handled.ts)0
-rw-r--r--cli/tests/testdata/run/queue_microtask_error_handled.ts.out (renamed from cli/tests/testdata/queue_microtask_error_handled.ts.out)0
-rw-r--r--cli/tests/testdata/run/reference_types.ts (renamed from cli/tests/testdata/reference_types.ts)0
-rw-r--r--cli/tests/testdata/run/reference_types.ts.out (renamed from cli/tests/testdata/reference_types.ts.out)0
-rw-r--r--cli/tests/testdata/run/reference_types_error.js (renamed from cli/tests/testdata/reference_types_error.js)0
-rw-r--r--cli/tests/testdata/run/reference_types_error.js.out (renamed from cli/tests/testdata/reference_types_error.js.out)0
-rw-r--r--cli/tests/testdata/run/reference_types_remote.ts (renamed from cli/tests/testdata/reference_types_remote.ts)0
-rw-r--r--cli/tests/testdata/run/reference_types_remote.ts.out (renamed from cli/tests/testdata/reference_types_remote.ts.out)0
-rw-r--r--cli/tests/testdata/run/replace_self.js (renamed from cli/tests/testdata/replace_self.js)0
-rw-r--r--cli/tests/testdata/run/replace_self.js.out (renamed from cli/tests/testdata/replace_self.js.out)0
-rw-r--r--cli/tests/testdata/run/report_error.ts (renamed from cli/tests/testdata/report_error.ts)0
-rw-r--r--cli/tests/testdata/run/report_error.ts.out (renamed from cli/tests/testdata/report_error.ts.out)0
-rw-r--r--cli/tests/testdata/run/report_error_end_of_program.ts (renamed from cli/tests/testdata/report_error_end_of_program.ts)0
-rw-r--r--cli/tests/testdata/run/report_error_end_of_program.ts.out (renamed from cli/tests/testdata/report_error_end_of_program.ts.out)0
-rw-r--r--cli/tests/testdata/run/report_error_handled.ts (renamed from cli/tests/testdata/report_error_handled.ts)0
-rw-r--r--cli/tests/testdata/run/report_error_handled.ts.out (renamed from cli/tests/testdata/report_error_handled.ts.out)0
-rw-r--r--cli/tests/testdata/run/resolve_dns.ts (renamed from cli/tests/testdata/resolve_dns.ts)0
-rw-r--r--cli/tests/testdata/run/resolve_dns.ts.out (renamed from cli/tests/testdata/resolve_dns.ts.out)0
-rw-r--r--cli/tests/testdata/run/resolve_dns.zone.in (renamed from cli/tests/testdata/resolve_dns.zone.in)0
-rw-r--r--cli/tests/testdata/run/runtime_decorators.ts (renamed from cli/tests/testdata/runtime_decorators.ts)0
-rw-r--r--cli/tests/testdata/run/runtime_decorators.ts.out (renamed from cli/tests/testdata/runtime_decorators.ts.out)0
-rw-r--r--cli/tests/testdata/run/seed_random.js (renamed from cli/tests/testdata/seed_random.js)0
-rw-r--r--cli/tests/testdata/run/seed_random.js.out (renamed from cli/tests/testdata/seed_random.js.out)0
-rw-r--r--cli/tests/testdata/run/set_exit_code_0.ts (renamed from cli/tests/testdata/set_exit_code_0.ts)0
-rw-r--r--cli/tests/testdata/run/set_exit_code_1.ts (renamed from cli/tests/testdata/set_exit_code_1.ts)0
-rw-r--r--cli/tests/testdata/run/set_exit_code_2.ts (renamed from cli/tests/testdata/set_exit_code_2.ts)0
-rw-r--r--cli/tests/testdata/run/set_timeout_error.ts (renamed from cli/tests/testdata/set_timeout_error.ts)0
-rw-r--r--cli/tests/testdata/run/set_timeout_error.ts.out (renamed from cli/tests/testdata/set_timeout_error.ts.out)0
-rw-r--r--cli/tests/testdata/run/set_timeout_error_handled.ts (renamed from cli/tests/testdata/set_timeout_error_handled.ts)0
-rw-r--r--cli/tests/testdata/run/set_timeout_error_handled.ts.out (renamed from cli/tests/testdata/set_timeout_error_handled.ts.out)0
-rw-r--r--cli/tests/testdata/run/shebang.ts (renamed from cli/tests/testdata/shebang.ts)0
-rw-r--r--cli/tests/testdata/run/shebang.ts.out (renamed from cli/tests/testdata/shebang.ts.out)0
-rw-r--r--cli/tests/testdata/run/shebang2.ts (renamed from cli/tests/testdata/shebang2.ts)0
-rw-r--r--cli/tests/testdata/run/single_compile_with_reload.ts (renamed from cli/tests/testdata/single_compile_with_reload.ts)0
-rw-r--r--cli/tests/testdata/run/single_compile_with_reload.ts.out (renamed from cli/tests/testdata/single_compile_with_reload.ts.out)0
-rw-r--r--cli/tests/testdata/run/single_compile_with_reload_dyn.ts (renamed from cli/tests/testdata/single_compile_with_reload_dyn.ts)2
-rw-r--r--cli/tests/testdata/run/single_compile_with_reload_worker.ts (renamed from cli/tests/testdata/single_compile_with_reload_worker.ts)0
-rw-r--r--cli/tests/testdata/run/spawn_stdout_inherit.ts (renamed from cli/tests/testdata/spawn_stdout_inherit.ts)0
-rw-r--r--cli/tests/testdata/run/spawn_stdout_inherit.ts.out (renamed from cli/tests/testdata/spawn_stdout_inherit.ts.out)0
-rw-r--r--cli/tests/testdata/run/swc_syntax_error.ts (renamed from cli/tests/testdata/swc_syntax_error.ts)0
-rw-r--r--cli/tests/testdata/run/swc_syntax_error.ts.out (renamed from cli/tests/testdata/swc_syntax_error.ts.out)0
-rw-r--r--cli/tests/testdata/run/test_and_bench_in_run.js (renamed from cli/tests/testdata/test_and_bench_in_run.js)0
-rw-r--r--cli/tests/testdata/run/tls.out (renamed from cli/tests/testdata/tls.out)0
-rw-r--r--cli/tests/testdata/run/tls_connecttls.js (renamed from cli/tests/testdata/tls_connecttls.js)8
-rw-r--r--cli/tests/testdata/run/tls_starttls.js (renamed from cli/tests/testdata/tls_starttls.js)8
-rw-r--r--cli/tests/testdata/run/top_level_await/circular.js (renamed from cli/tests/testdata/top_level_await_circular.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/circular.out (renamed from cli/tests/testdata/top_level_await_circular.out)0
-rw-r--r--cli/tests/testdata/run/top_level_await/loop.js (renamed from cli/tests/testdata/top_level_await_loop.js)6
-rw-r--r--cli/tests/testdata/run/top_level_await/loop.out (renamed from cli/tests/testdata/top_level_await_loop.out)0
-rw-r--r--cli/tests/testdata/run/top_level_await/nested.out (renamed from cli/tests/testdata/top_level_await_nested.out)0
-rw-r--r--cli/tests/testdata/run/top_level_await/nested/a.js (renamed from cli/tests/testdata/top_level_await_nested/a.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/nested/b.js (renamed from cli/tests/testdata/top_level_await_nested/b.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/nested/main.js (renamed from cli/tests/testdata/top_level_await_nested/main.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/order.js (renamed from cli/tests/testdata/top_level_await_order.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/order.out (renamed from cli/tests/testdata/top_level_await_order.out)0
-rw-r--r--cli/tests/testdata/run/top_level_await/tla/a.js (renamed from cli/tests/testdata/tla/a.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/tla/b.js (renamed from cli/tests/testdata/tla/b.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/tla/c.js (renamed from cli/tests/testdata/tla/c.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/tla/d.js (renamed from cli/tests/testdata/tla/d.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/tla/order.js (renamed from cli/tests/testdata/tla/order.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/tla/parent.js (renamed from cli/tests/testdata/tla/parent.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/tla2/a.js (renamed from cli/tests/testdata/tla2/a.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/tla2/b.js (renamed from cli/tests/testdata/tla2/b.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/tla3/b.js (renamed from cli/tests/testdata/tla3/b.js)2
-rw-r--r--cli/tests/testdata/run/top_level_await/tla3/timeout_loop.js (renamed from cli/tests/testdata/tla3/timeout_loop.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/top_level_await.js (renamed from cli/tests/testdata/top_level_await.js)2
-rw-r--r--cli/tests/testdata/run/top_level_await/top_level_await.out (renamed from cli/tests/testdata/top_level_await.out)0
-rw-r--r--cli/tests/testdata/run/top_level_await/top_level_await.ts (renamed from cli/tests/testdata/top_level_await.ts)2
-rw-r--r--cli/tests/testdata/run/top_level_await/top_level_for_await.js (renamed from cli/tests/testdata/top_level_for_await.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/top_level_for_await.out (renamed from cli/tests/testdata/top_level_for_await.out)0
-rw-r--r--cli/tests/testdata/run/top_level_await/top_level_for_await.ts (renamed from cli/tests/testdata/top_level_for_await.ts)0
-rw-r--r--cli/tests/testdata/run/top_level_await/unresolved.js (renamed from cli/tests/testdata/top_level_await_unresolved.js)0
-rw-r--r--cli/tests/testdata/run/top_level_await/unresolved.out (renamed from cli/tests/testdata/top_level_await_unresolved.out)0
-rw-r--r--cli/tests/testdata/run/ts_decorators.ts (renamed from cli/tests/testdata/ts_decorators.ts)0
-rw-r--r--cli/tests/testdata/run/ts_decorators.ts.out (renamed from cli/tests/testdata/ts_decorators.ts.out)0
-rw-r--r--cli/tests/testdata/run/ts_import_from_js/deps.js (renamed from cli/tests/testdata/ts_import_from_js.deps.js)2
-rw-r--r--cli/tests/testdata/run/ts_import_from_js/main.js3
-rw-r--r--cli/tests/testdata/run/ts_import_from_js/main.out (renamed from cli/tests/testdata/ts_import_from_js.js.out)0
-rw-r--r--cli/tests/testdata/run/ts_type_imports.ts (renamed from cli/tests/testdata/ts_type_imports.ts)0
-rw-r--r--cli/tests/testdata/run/ts_type_imports.ts.out (renamed from cli/tests/testdata/ts_type_imports.ts.out)0
-rw-r--r--cli/tests/testdata/run/ts_type_imports_foo.ts (renamed from cli/tests/testdata/ts_type_imports_foo.ts)0
-rw-r--r--cli/tests/testdata/run/ts_type_only_import.d.ts (renamed from cli/tests/testdata/ts_type_only_import.d.ts)0
-rw-r--r--cli/tests/testdata/run/ts_type_only_import.ts (renamed from cli/tests/testdata/ts_type_only_import.ts)0
-rw-r--r--cli/tests/testdata/run/ts_type_only_import.ts.out (renamed from cli/tests/testdata/ts_type_only_import.ts.out)0
-rw-r--r--cli/tests/testdata/run/tsx_imports/Component.tsx1
-rw-r--r--cli/tests/testdata/run/tsx_imports/tsx_imports.ts (renamed from cli/tests/testdata/tsx_imports.ts)0
-rw-r--r--cli/tests/testdata/run/tsx_imports/tsx_imports.ts.out (renamed from cli/tests/testdata/tsx_imports.ts.out)0
-rw-r--r--cli/tests/testdata/run/type_definitions.ts12
-rw-r--r--cli/tests/testdata/run/type_definitions.ts.out (renamed from cli/tests/testdata/type_definitions.ts.out)0
-rw-r--r--cli/tests/testdata/run/type_definitions_for_export.ts (renamed from cli/tests/testdata/type_definitions_for_export.ts)0
-rw-r--r--cli/tests/testdata/run/type_definitions_for_export.ts.out (renamed from cli/tests/testdata/type_definitions_for_export.ts.out)0
-rw-r--r--cli/tests/testdata/run/type_directives_01.ts (renamed from cli/tests/testdata/type_directives_01.ts)0
-rw-r--r--cli/tests/testdata/run/type_directives_01.ts.out (renamed from cli/tests/testdata/type_directives_01.ts.out)0
-rw-r--r--cli/tests/testdata/run/type_directives_02.ts3
-rw-r--r--cli/tests/testdata/run/type_directives_02.ts.out (renamed from cli/tests/testdata/type_directives_02.ts.out)0
-rw-r--r--cli/tests/testdata/run/type_directives_js_main.js3
-rw-r--r--cli/tests/testdata/run/type_directives_js_main.js.out (renamed from cli/tests/testdata/type_directives_js_main.js.out)0
-rw-r--r--cli/tests/testdata/run/type_directives_redirect.ts1
-rw-r--r--cli/tests/testdata/run/type_directives_redirect.ts.out (renamed from cli/tests/testdata/type_directives_redirect.ts.out)0
-rw-r--r--cli/tests/testdata/run/type_headers_deno_types.ts (renamed from cli/tests/testdata/type_headers_deno_types.ts)4
-rw-r--r--cli/tests/testdata/run/type_headers_deno_types.ts.out5
-rw-r--r--cli/tests/testdata/run/unbuffered_stderr.ts (renamed from cli/tests/testdata/unbuffered_stderr.ts)0
-rw-r--r--cli/tests/testdata/run/unbuffered_stderr.ts.out (renamed from cli/tests/testdata/unbuffered_stderr.ts.out)0
-rw-r--r--cli/tests/testdata/run/unbuffered_stdout.ts (renamed from cli/tests/testdata/unbuffered_stdout.ts)0
-rw-r--r--cli/tests/testdata/run/unbuffered_stdout.ts.out (renamed from cli/tests/testdata/unbuffered_stdout.ts.out)0
-rw-r--r--cli/tests/testdata/run/unhandled_rejection.ts (renamed from cli/tests/testdata/unhandled_rejection.ts)0
-rw-r--r--cli/tests/testdata/run/unhandled_rejection.ts.out9
-rw-r--r--cli/tests/testdata/run/unhandled_rejection_sync_error.ts (renamed from cli/tests/testdata/unhandled_rejection_sync_error.ts)0
-rw-r--r--cli/tests/testdata/run/unhandled_rejection_sync_error.ts.out6
-rw-r--r--cli/tests/testdata/run/unstable.js (renamed from cli/tests/testdata/unstable.js)0
-rw-r--r--cli/tests/testdata/run/unstable.ts (renamed from cli/tests/testdata/unstable.ts)0
-rw-r--r--cli/tests/testdata/run/unstable_disabled.out (renamed from cli/tests/testdata/unstable_disabled.out)0
-rw-r--r--cli/tests/testdata/run/unstable_disabled_js.out (renamed from cli/tests/testdata/unstable_disabled_js.out)0
-rw-r--r--cli/tests/testdata/run/unstable_enabled.out (renamed from cli/tests/testdata/unstable_enabled.out)0
-rw-r--r--cli/tests/testdata/run/unstable_enabled_js.out (renamed from cli/tests/testdata/unstable_enabled_js.out)0
-rw-r--r--cli/tests/testdata/run/unstable_worker.ts (renamed from cli/tests/testdata/unstable_worker.ts)2
-rw-r--r--cli/tests/testdata/run/unstable_worker.ts.out (renamed from cli/tests/testdata/unstable_worker.ts.out)0
-rw-r--r--cli/tests/testdata/run/unsupported_dynamic_import_scheme.out (renamed from cli/tests/testdata/unsupported_dynamic_import_scheme.out)0
-rw-r--r--cli/tests/testdata/run/v8_flags.js (renamed from cli/tests/testdata/v8_flags.js)0
-rw-r--r--cli/tests/testdata/run/v8_flags.js.out (renamed from cli/tests/testdata/v8_flags.js.out)0
-rw-r--r--cli/tests/testdata/run/v8_flags_unrecognized.out (renamed from cli/tests/testdata/v8_flags_unrecognized.out)0
-rw-r--r--cli/tests/testdata/run/v8_help.out (renamed from cli/tests/testdata/v8_help.out)0
-rw-r--r--cli/tests/testdata/run/wasm.ts (renamed from cli/tests/testdata/wasm.ts)0
-rw-r--r--cli/tests/testdata/run/wasm.ts.out (renamed from cli/tests/testdata/wasm.ts.out)0
-rw-r--r--cli/tests/testdata/run/wasm_async.js (renamed from cli/tests/testdata/wasm_async.js)0
-rw-r--r--cli/tests/testdata/run/wasm_async.out (renamed from cli/tests/testdata/wasm_async.out)0
-rw-r--r--cli/tests/testdata/run/wasm_shared.out (renamed from cli/tests/testdata/wasm_shared.out)0
-rw-r--r--cli/tests/testdata/run/wasm_shared.ts (renamed from cli/tests/testdata/wasm_shared.ts)0
-rw-r--r--cli/tests/testdata/run/wasm_streaming_panic_test.js (renamed from cli/tests/testdata/wasm_streaming_panic_test.js)0
-rw-r--r--cli/tests/testdata/run/wasm_streaming_panic_test.js.out (renamed from cli/tests/testdata/wasm_streaming_panic_test.js.out)0
-rw-r--r--cli/tests/testdata/run/wasm_unreachable.js (renamed from cli/tests/testdata/wasm_unreachable.js)2
-rw-r--r--cli/tests/testdata/run/wasm_unreachable.out (renamed from cli/tests/testdata/wasm_unreachable.out)0
-rw-r--r--cli/tests/testdata/run/wasm_url.js (renamed from cli/tests/testdata/wasm_url.js)2
-rw-r--r--cli/tests/testdata/run/wasm_url.out (renamed from cli/tests/testdata/wasm_url.out)2
-rw-r--r--cli/tests/testdata/run/weakref.ts (renamed from cli/tests/testdata/weakref.ts)0
-rw-r--r--cli/tests/testdata/run/weakref.ts.out (renamed from cli/tests/testdata/weakref.ts.out)0
-rw-r--r--cli/tests/testdata/run/websocket_server_idletimeout.ts (renamed from cli/tests/testdata/websocket_server_idletimeout.ts)0
-rw-r--r--cli/tests/testdata/run/websocket_server_multi_field_connection_header_test.ts (renamed from cli/tests/testdata/websocket_server_multi_field_connection_header_test.ts)2
-rw-r--r--cli/tests/testdata/run/websocket_test.ts (renamed from cli/tests/testdata/websocket_test.ts)4
-rw-r--r--cli/tests/testdata/run/websocketstream_ping_test.ts (renamed from cli/tests/testdata/websocketstream_ping_test.ts)0
-rw-r--r--cli/tests/testdata/run/websocketstream_test.ts (renamed from cli/tests/testdata/websocketstream_test.ts)2
-rw-r--r--cli/tests/testdata/run/webstorage/config_a.jsonc (renamed from cli/tests/testdata/webstorage/config_a.jsonc)0
-rw-r--r--cli/tests/testdata/run/webstorage/config_b.jsonc (renamed from cli/tests/testdata/webstorage/config_b.jsonc)0
-rw-r--r--cli/tests/testdata/run/webstorage/fixture.ts (renamed from cli/tests/testdata/webstorage/fixture.ts)0
-rw-r--r--cli/tests/testdata/run/webstorage/logger.ts (renamed from cli/tests/testdata/webstorage/logger.ts)0
-rw-r--r--cli/tests/testdata/run/webstorage/serialization.ts (renamed from cli/tests/testdata/webstorage/serialization.ts)0
-rw-r--r--cli/tests/testdata/run/webstorage/serialization.ts.out (renamed from cli/tests/testdata/webstorage/serialization.ts.out)0
-rw-r--r--cli/tests/testdata/run/webstorage/setter.ts (renamed from cli/tests/testdata/webstorage/setter.ts)0
-rw-r--r--cli/tests/testdata/run/worker_close_in_wasm_reactions.js (renamed from cli/tests/testdata/worker_close_in_wasm_reactions.js)2
-rw-r--r--cli/tests/testdata/run/worker_close_in_wasm_reactions.js.out (renamed from cli/tests/testdata/worker_close_in_wasm_reactions.js.out)0
-rw-r--r--cli/tests/testdata/run/worker_close_nested.js (renamed from cli/tests/testdata/worker_close_nested.js)2
-rw-r--r--cli/tests/testdata/run/worker_close_nested.js.out (renamed from cli/tests/testdata/worker_close_nested.js.out)0
-rw-r--r--cli/tests/testdata/run/worker_close_race.js (renamed from cli/tests/testdata/worker_close_race.js)2
-rw-r--r--cli/tests/testdata/run/worker_close_race.js.out (renamed from cli/tests/testdata/worker_close_race.js.out)0
-rw-r--r--cli/tests/testdata/run/worker_drop_handle_race.js (renamed from cli/tests/testdata/worker_drop_handle_race.js)2
-rw-r--r--cli/tests/testdata/run/worker_drop_handle_race.js.out (renamed from cli/tests/testdata/worker_drop_handle_race.js.out)0
-rw-r--r--cli/tests/testdata/run/worker_drop_handle_race_terminate.js (renamed from cli/tests/testdata/worker_drop_handle_race_terminate.js)0
-rw-r--r--cli/tests/testdata/run/worker_drop_handle_race_terminate.js.out (renamed from cli/tests/testdata/worker_drop_handle_race_terminate.js.out)0
-rw-r--r--cli/tests/testdata/run/worker_event_handler_test.js (renamed from cli/tests/testdata/worker_event_handler_test.js)2
-rw-r--r--cli/tests/testdata/run/worker_event_handler_test.js.out (renamed from cli/tests/testdata/worker_event_handler_test.js.out)0
-rw-r--r--cli/tests/testdata/run/worker_message_before_close.js (renamed from cli/tests/testdata/worker_message_before_close.js)2
-rw-r--r--cli/tests/testdata/run/worker_message_before_close.js.out (renamed from cli/tests/testdata/worker_message_before_close.js.out)0
-rw-r--r--cli/tests/testdata/runtime/esm_imports_a.js (renamed from cli/tests/testdata/esm_imports_a.js)0
-rw-r--r--cli/tests/testdata/runtime/esm_imports_b.js (renamed from cli/tests/testdata/esm_imports_b.js)0
-rw-r--r--cli/tests/testdata/standalone_dynamic_imports.ts15
-rw-r--r--cli/tests/testdata/standalone_import.ts2
-rw-r--r--cli/tests/testdata/standalone_import_map.json5
-rw-r--r--cli/tests/testdata/std_lint.out3
-rw-r--r--cli/tests/testdata/test/resource_sanitizer.ts2
-rw-r--r--cli/tests/testdata/ts_import_from_js.js3
-rw-r--r--cli/tests/testdata/ts_with_generic.ts3
-rw-r--r--cli/tests/testdata/type_definitions.ts12
-rw-r--r--cli/tests/testdata/type_directives_02.ts3
-rw-r--r--cli/tests/testdata/type_directives_js_main.js3
-rw-r--r--cli/tests/testdata/type_directives_redirect.ts1
-rw-r--r--cli/tests/testdata/type_headers_deno_types.ts.out5
-rw-r--r--cli/tests/testdata/types/types.out (renamed from cli/tests/testdata/types.out)0
-rw-r--r--cli/tests/testdata/unhandled_rejection.ts.out9
-rw-r--r--cli/tests/testdata/unhandled_rejection_sync_error.ts.out6
-rw-r--r--cli/tests/testdata/webgpu/computepass_shader.wgsl (renamed from cli/tests/testdata/webgpu_computepass_shader.wgsl)0
-rw-r--r--cli/tests/testdata/webgpu/hellotriangle.out (renamed from cli/tests/testdata/webgpu_hellotriangle.out)bin204800 -> 204800 bytes
-rw-r--r--cli/tests/testdata/webgpu/hellotriangle_shader.wgsl (renamed from cli/tests/testdata/webgpu_hellotriangle_shader.wgsl)0
-rw-r--r--cli/tests/testdata/workers/custom_inspect/main.out (renamed from cli/tests/testdata/084_worker_custom_inspect.ts.out)0
-rw-r--r--cli/tests/testdata/workers/custom_inspect/main.ts4
-rw-r--r--cli/tests/testdata/workers/custom_inspect/worker.ts (renamed from cli/tests/testdata/084_worker_custom_inspect_worker.ts)0
-rw-r--r--cli/tests/testdata/workers/error_worker_permissions_local.ts4
-rw-r--r--cli/tests/testdata/workers/error_worker_permissions_local.ts.out (renamed from cli/tests/testdata/error_worker_permissions_local.ts.out)0
-rw-r--r--cli/tests/testdata/workers/error_worker_permissions_remote.ts (renamed from cli/tests/testdata/error_worker_permissions_remote.ts)0
-rw-r--r--cli/tests/testdata/workers/error_worker_permissions_remote.ts.out (renamed from cli/tests/testdata/error_worker_permissions_remote.ts.out)0
-rw-r--r--cli/tests/unit/fetch_test.ts48
-rw-r--r--cli/tests/unit/files_test.ts30
-rw-r--r--cli/tests/unit/flock_test.ts2
-rw-r--r--cli/tests/unit/net_test.ts2
-rw-r--r--cli/tests/unit/read_dir_test.ts4
-rw-r--r--cli/tests/unit/read_file_test.ts20
-rw-r--r--cli/tests/unit/read_text_file_test.ts22
-rw-r--r--cli/tests/unit/real_path_test.ts8
-rw-r--r--cli/tests/unit/resources_test.ts2
-rw-r--r--cli/tests/unit/stat_test.ts2
-rw-r--r--cli/tests/unit/tty_test.ts4
-rw-r--r--cli/tests/unit/wasm_test.ts4
-rw-r--r--cli/tests/unit/webgpu_test.ts6
-rw-r--r--cli/tools/fmt.rs4
-rw-r--r--runtime/worker.rs4
-rw-r--r--test_util/src/lib.rs16
-rwxr-xr-xtools/lint.js2
816 files changed, 2430 insertions, 2425 deletions
diff --git a/.dprint.json b/.dprint.json
index 64ac4e464..e98a01747 100644
--- a/.dprint.json
+++ b/.dprint.json
@@ -27,13 +27,13 @@
"cli/dts/lib.scripthost.d.ts",
"cli/dts/lib.webworker*.d.ts",
"cli/dts/typescript.d.ts",
- "cli/tests/testdata/badly_formatted.json",
- "cli/tests/testdata/badly_formatted.md",
+ "cli/tests/testdata/fmt/badly_formatted.json",
+ "cli/tests/testdata/fmt/badly_formatted.md",
"cli/tests/testdata/byte_order_mark.ts",
"cli/tests/testdata/encoding",
"cli/tests/testdata/fmt/*",
"cli/tests/testdata/import_assertions/json_with_shebang.json",
- "cli/tests/testdata/inline_js_source_map*",
+ "cli/tests/testdata/run/inline_js_source_map*",
"cli/tests/testdata/malformed_config/*",
"cli/tests/testdata/npm/registry/",
"cli/tests/testdata/test/markdown_windows.md",
diff --git a/cli/bench/main.rs b/cli/bench/main.rs
index 0ef520edd..c1d8ba2e4 100644
--- a/cli/bench/main.rs
+++ b/cli/bench/main.rs
@@ -35,7 +35,7 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option<i32>)] = &[
// invalidating that cache.
(
"cold_hello",
- &["run", "--reload", "cli/tests/testdata/002_hello.ts"],
+ &["run", "--reload", "cli/tests/testdata/run/002_hello.ts"],
None,
),
(
@@ -43,19 +43,23 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option<i32>)] = &[
&[
"run",
"--reload",
- "cli/tests/testdata/003_relative_import.ts",
+ "cli/tests/testdata/run/003_relative_import.ts",
],
None,
),
- ("hello", &["run", "cli/tests/testdata/002_hello.ts"], None),
+ (
+ "hello",
+ &["run", "cli/tests/testdata/run/002_hello.ts"],
+ None,
+ ),
(
"relative_import",
- &["run", "cli/tests/testdata/003_relative_import.ts"],
+ &["run", "cli/tests/testdata/run/003_relative_import.ts"],
None,
),
(
"error_001",
- &["run", "cli/tests/testdata/error_001.ts"],
+ &["run", "cli/tests/testdata/run/error_001.ts"],
Some(1),
),
(
@@ -64,7 +68,7 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option<i32>)] = &[
"run",
"--reload",
"--no-check",
- "cli/tests/testdata/002_hello.ts",
+ "cli/tests/testdata/run/002_hello.ts",
],
None,
),
@@ -97,22 +101,25 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option<i32>)] = &[
),
(
"text_decoder",
- &["run", "cli/tests/testdata/text_decoder_perf.js"],
+ &["run", "cli/tests/testdata/benches/text_decoder_perf.js"],
None,
),
(
"text_encoder",
- &["run", "cli/tests/testdata/text_encoder_perf.js"],
+ &["run", "cli/tests/testdata/benches/text_encoder_perf.js"],
None,
),
(
"text_encoder_into",
- &["run", "cli/tests/testdata/text_encoder_into_perf.js"],
+ &[
+ "run",
+ "cli/tests/testdata/benches/text_encoder_into_perf.js",
+ ],
None,
),
(
"response_string",
- &["run", "cli/tests/testdata/response_string_perf.js"],
+ &["run", "cli/tests/testdata/benches/response_string_perf.js"],
None,
),
(
diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs
index 044707cff..3e3776f24 100644
--- a/cli/file_fetcher.rs
+++ b/cli/file_fetcher.rs
@@ -1551,7 +1551,8 @@ mod tests {
None,
)
.unwrap();
- let specifier = resolve_url("http://localhost:4545/002_hello.ts").unwrap();
+ let specifier =
+ resolve_url("http://localhost:4545/run/002_hello.ts").unwrap();
let result = file_fetcher
.fetch(&specifier, &mut Permissions::allow_all())
@@ -1559,7 +1560,7 @@ mod tests {
assert!(result.is_err());
let err = result.unwrap_err();
assert_eq!(get_custom_error_class(&err), Some("NoRemote"));
- assert_eq!(err.to_string(), "A remote specifier was requested: \"http://localhost:4545/002_hello.ts\", but --no-remote is specified.");
+ assert_eq!(err.to_string(), "A remote specifier was requested: \"http://localhost:4545/run/002_hello.ts\", but --no-remote is specified.");
}
#[tokio::test]
@@ -1587,7 +1588,8 @@ mod tests {
None,
)
.unwrap();
- let specifier = resolve_url("http://localhost:4545/002_hello.ts").unwrap();
+ let specifier =
+ resolve_url("http://localhost:4545/run/002_hello.ts").unwrap();
let result = file_fetcher_01
.fetch(&specifier, &mut Permissions::allow_all())
@@ -1595,7 +1597,7 @@ mod tests {
assert!(result.is_err());
let err = result.unwrap_err();
assert_eq!(get_custom_error_class(&err), Some("NotCached"));
- assert_eq!(err.to_string(), "Specifier not found in cache: \"http://localhost:4545/002_hello.ts\", --cached-only is specified.");
+ assert_eq!(err.to_string(), "Specifier not found in cache: \"http://localhost:4545/run/002_hello.ts\", --cached-only is specified.");
let result = file_fetcher_02
.fetch(&specifier, &mut Permissions::allow_all())
diff --git a/cli/fs_util.rs b/cli/fs_util.rs
index 69d4f7248..f3a4addc0 100644
--- a/cli/fs_util.rs
+++ b/cli/fs_util.rs
@@ -542,8 +542,8 @@ mod tests {
assert!(!is_supported_ext(Path::new("tests/subdir/redirects")));
assert!(!is_supported_ext(Path::new("README.md")));
assert!(is_supported_ext(Path::new("lib/typescript.d.ts")));
- assert!(is_supported_ext(Path::new("testdata/001_hello.js")));
- assert!(is_supported_ext(Path::new("testdata/002_hello.ts")));
+ assert!(is_supported_ext(Path::new("testdata/run/001_hello.js")));
+ assert!(is_supported_ext(Path::new("testdata/run/002_hello.ts")));
assert!(is_supported_ext(Path::new("foo.jsx")));
assert!(is_supported_ext(Path::new("foo.tsx")));
assert!(is_supported_ext(Path::new("foo.TS")));
@@ -563,8 +563,12 @@ mod tests {
assert!(is_supported_test_ext(Path::new("README.md")));
assert!(is_supported_test_ext(Path::new("readme.MD")));
assert!(is_supported_test_ext(Path::new("lib/typescript.d.ts")));
- assert!(is_supported_test_ext(Path::new("testdata/001_hello.js")));
- assert!(is_supported_test_ext(Path::new("testdata/002_hello.ts")));
+ assert!(is_supported_test_ext(Path::new(
+ "testdata/run/001_hello.js"
+ )));
+ assert!(is_supported_test_ext(Path::new(
+ "testdata/run/002_hello.ts"
+ )));
assert!(is_supported_test_ext(Path::new("foo.jsx")));
assert!(is_supported_test_ext(Path::new("foo.tsx")));
assert!(is_supported_test_ext(Path::new("foo.TS")));
diff --git a/cli/http_util.rs b/cli/http_util.rs
index 122b71a59..54d641bef 100644
--- a/cli/http_util.rs
+++ b/cli/http_util.rs
@@ -324,7 +324,7 @@ mod tests {
async fn test_fetch_string() {
let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
- let url = Url::parse("http://127.0.0.1:4545/fixture.json").unwrap();
+ let url = Url::parse("http://127.0.0.1:4545/assets/fixture.json").unwrap();
let client = create_test_client();
let result = fetch_once(FetchOnceArgs {
client,
@@ -348,7 +348,7 @@ mod tests {
async fn test_fetch_gzip() {
let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
- let url = Url::parse("http://127.0.0.1:4545/053_import_compression/gziped")
+ let url = Url::parse("http://127.0.0.1:4545/run/import_compression/gziped")
.unwrap();
let client = create_test_client();
let result = fetch_once(FetchOnceArgs {
@@ -412,7 +412,7 @@ mod tests {
async fn test_fetch_brotli() {
let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
- let url = Url::parse("http://127.0.0.1:4545/053_import_compression/brotli")
+ let url = Url::parse("http://127.0.0.1:4545/run/import_compression/brotli")
.unwrap();
let client = create_test_client();
let result = fetch_once(FetchOnceArgs {
@@ -462,9 +462,10 @@ mod tests {
async fn test_fetch_once_with_redirect() {
let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
- let url = Url::parse("http://127.0.0.1:4546/fixture.json").unwrap();
+ let url = Url::parse("http://127.0.0.1:4546/assets/fixture.json").unwrap();
// Dns resolver substitutes `127.0.0.1` with `localhost`
- let target_url = Url::parse("http://localhost:4545/fixture.json").unwrap();
+ let target_url =
+ Url::parse("http://localhost:4545/assets/fixture.json").unwrap();
let client = create_test_client();
let result = fetch_once(FetchOnceArgs {
client,
@@ -523,7 +524,7 @@ mod tests {
async fn test_fetch_with_cafile_string() {
let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
- let url = Url::parse("https://localhost:5545/fixture.json").unwrap();
+ let url = Url::parse("https://localhost:5545/assets/fixture.json").unwrap();
let client = create_http_client(
version::get_user_agent(),
@@ -630,7 +631,7 @@ mod tests {
let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
let url =
- Url::parse("https://localhost:5545/053_import_compression/gziped")
+ Url::parse("https://localhost:5545/run/import_compression/gziped")
.unwrap();
let client = create_http_client(
version::get_user_agent(),
@@ -724,7 +725,7 @@ mod tests {
let _http_server_guard = test_util::http_server();
// Relies on external http server. See target/debug/test_server
let url =
- Url::parse("https://localhost:5545/053_import_compression/brotli")
+ Url::parse("https://localhost:5545/run/import_compression/brotli")
.unwrap();
let client = create_http_client(
version::get_user_agent(),
diff --git a/cli/tests/integration/bundle_tests.rs b/cli/tests/integration/bundle_tests.rs
index a2e529000..ff5a51e98 100644
--- a/cli/tests/integration/bundle_tests.rs
+++ b/cli/tests/integration/bundle_tests.rs
@@ -231,27 +231,27 @@ fn bundle_js() {
#[test]
fn bundle_dynamic_import() {
let _g = util::http_server();
- let dynamic_import = util::testdata_path().join("bundle_dynamic_import.ts");
+ let dynamic_import = util::testdata_path().join("bundle/dynamic_import.ts");
assert!(dynamic_import.is_file());
let t = TempDir::new();
- let bundle = t.path().join("bundle_dynamic_import.bundle.js");
+ let output_path = t.path().join("bundle_dynamic_import.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("bundle")
.arg(dynamic_import)
- .arg(&bundle)
+ .arg(&output_path)
.spawn()
.unwrap();
let status = deno.wait().unwrap();
assert!(status.success());
- assert!(bundle.is_file());
+ assert!(output_path.is_file());
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
.arg("--allow-net")
.arg("--quiet")
- .arg(&bundle)
+ .arg(&output_path)
.output()
.unwrap();
// check the output of the test.ts program.
@@ -264,23 +264,24 @@ fn bundle_dynamic_import() {
#[test]
fn bundle_import_map() {
- let import = util::testdata_path().join("bundle_im.ts");
- let import_map_path = util::testdata_path().join("bundle_im.json");
+ let import = util::testdata_path().join("bundle/import_map/main.ts");
+ let import_map_path =
+ util::testdata_path().join("bundle/import_map/import_map.json");
assert!(import.is_file());
let t = TempDir::new();
- let bundle = t.path().join("import_map.bundle.js");
+ let output_path = t.path().join("import_map.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("bundle")
.arg("--import-map")
.arg(import_map_path)
.arg(import)
- .arg(&bundle)
+ .arg(&output_path)
.spawn()
.unwrap();
let status = deno.wait().unwrap();
assert!(status.success());
- assert!(bundle.is_file());
+ assert!(output_path.is_file());
// Now we try to use that bundle from another module.
let test = t.path().join("test.js");
@@ -309,23 +310,24 @@ fn bundle_import_map() {
#[test]
fn bundle_import_map_no_check() {
- let import = util::testdata_path().join("bundle_im.ts");
- let import_map_path = util::testdata_path().join("bundle_im.json");
+ let import = util::testdata_path().join("bundle/import_map/main.ts");
+ let import_map_path =
+ util::testdata_path().join("bundle/import_map/import_map.json");
assert!(import.is_file());
let t = TempDir::new();
- let bundle = t.path().join("import_map.bundle.js");
+ let output_path = t.path().join("import_map.bundle.js");
let mut deno = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("bundle")
.arg("--import-map")
.arg(import_map_path)
.arg(import)
- .arg(&bundle)
+ .arg(&output_path)
.spawn()
.unwrap();
let status = deno.wait().unwrap();
assert!(status.success());
- assert!(bundle.is_file());
+ assert!(output_path.is_file());
// Now we try to use that bundle from another module.
let test = t.path().join("test.js");
@@ -414,32 +416,32 @@ fn bundle_json_module_escape_sub() {
);
}
-itest!(lock_check_err_with_bundle {
- args: "bundle --lock=lock_check_err_with_bundle.json http://127.0.0.1:4545/subdir/mod1.ts",
- output: "lock_check_err_with_bundle.out",
+itest!(lockfile_check_error {
+ args: "bundle --lock=bundle/lockfile/check_error.json http://127.0.0.1:4545/subdir/mod1.ts",
+ output: "bundle/lockfile/check_error.out",
exit_code: 10,
http_server: true,
});
itest!(bundle {
args: "bundle subdir/mod1.ts",
- output: "bundle.test.out",
+ output: "bundle/bundle.test.out",
});
itest!(bundle_jsx {
- args: "bundle jsx_import_from_ts.ts",
- output: "bundle_jsx.out",
+ args: "bundle run/jsx_import_from_ts.ts",
+ output: "bundle/jsx.out",
});
-itest!(error_027_bundle_with_bare_import {
- args: "bundle error_027_bundle_with_bare_import.ts",
- output: "error_027_bundle_with_bare_import.ts.out",
+itest!(error_bundle_with_bare_import {
+ args: "bundle bundle/bare_imports/error_with_bare_import.ts",
+ output: "bundle/bare_imports/error_with_bare_import.ts.out",
exit_code: 1,
});
itest!(ts_decorators_bundle {
- args: "bundle ts_decorators_bundle.ts",
- output: "ts_decorators_bundle.out",
+ args: "bundle bundle/decorators/ts_decorators.ts",
+ output: "bundle/decorators/ts_decorators.out",
});
itest!(bundle_export_specifier_with_alias {
@@ -449,18 +451,18 @@ itest!(bundle_export_specifier_with_alias {
itest!(bundle_ignore_directives {
args: "bundle subdir/mod1.ts",
- output: "bundle_ignore_directives.test.out",
+ output: "bundle/ignore_directives.test.out",
});
-itest!(check_local_by_default {
- args: "bundle --quiet bundle/check_local_by_default.ts",
- output: "bundle/check_local_by_default.out",
+itest!(check_local_by_default_no_errors {
+ args: "bundle --quiet bundle/check_local_by_default/no_errors.ts",
+ output: "bundle/check_local_by_default/no_errors.out",
http_server: true,
});
-itest!(check_local_by_default2 {
- args: "bundle --quiet bundle/check_local_by_default2.ts",
- output: "bundle/check_local_by_default2.out",
+itest!(check_local_by_default_type_error {
+ args: "bundle --quiet bundle/check_local_by_default/type_error.ts",
+ output: "bundle/check_local_by_default/type_error.out",
http_server: true,
exit_code: 1,
});
diff --git a/cli/tests/integration/cache_tests.rs b/cli/tests/integration/cache_tests.rs
index 54aea8106..3fca335a9 100644
--- a/cli/tests/integration/cache_tests.rs
+++ b/cli/tests/integration/cache_tests.rs
@@ -5,48 +5,48 @@ use crate::itest;
itest!(_036_import_map_fetch {
args:
"cache --quiet --reload --import-map=import_maps/import_map.json import_maps/test.ts",
- output: "036_import_map_fetch.out",
+ output: "cache/036_import_map_fetch.out",
});
itest!(_037_fetch_multiple {
- args: "cache --reload --check=all fetch/test.ts fetch/other.ts",
+ args: "cache --reload --check=all run/fetch/test.ts run/fetch/other.ts",
http_server: true,
- output: "037_fetch_multiple.out",
+ output: "cache/037_fetch_multiple.out",
});
itest!(_095_cache_with_bare_import {
- args: "cache 095_cache_with_bare_import.ts",
- output: "095_cache_with_bare_import.ts.out",
+ args: "cache cache/095_cache_with_bare_import.ts",
+ output: "cache/095_cache_with_bare_import.ts.out",
exit_code: 1,
});
itest!(cache_extensionless {
args: "cache --reload --check=all http://localhost:4545/subdir/no_js_ext",
- output: "cache_extensionless.out",
+ output: "cache/cache_extensionless.out",
http_server: true,
});
itest!(cache_random_extension {
args:
"cache --reload --check=all http://localhost:4545/subdir/no_js_ext@1.0.0",
- output: "cache_random_extension.out",
+ output: "cache/cache_random_extension.out",
http_server: true,
});
itest!(performance_stats {
- args: "cache --reload --check=all --log-level debug 002_hello.ts",
- output: "performance_stats.out",
+ args: "cache --reload --check=all --log-level debug run/002_hello.ts",
+ output: "cache/performance_stats.out",
});
itest!(redirect_cache {
http_server: true,
args:
"cache --reload --check=all http://localhost:4548/subdir/redirects/a.ts",
- output: "redirect_cache.out",
+ output: "cache/redirect_cache.out",
});
itest!(ignore_require {
- args: "cache --reload --no-check ignore_require.js",
+ args: "cache --reload --no-check cache/ignore_require.js",
output_str: Some(""),
exit_code: 0,
});
@@ -71,7 +71,7 @@ fn relative_home_dir() {
.arg("cache")
.arg("--reload")
.arg("--no-check")
- .arg("002_hello.ts")
+ .arg("run/002_hello.ts")
.stdout(std::process::Stdio::piped())
.spawn()
.unwrap()
diff --git a/cli/tests/integration/cert_tests.rs b/cli/tests/integration/cert_tests.rs
new file mode 100644
index 000000000..fd19c1cc1
--- /dev/null
+++ b/cli/tests/integration/cert_tests.rs
@@ -0,0 +1,316 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+use crate::itest;
+use deno_runtime::deno_net::ops_tls::TlsStream;
+use deno_runtime::deno_tls::rustls;
+use deno_runtime::deno_tls::rustls_pemfile;
+use std::io::BufReader;
+use std::io::Cursor;
+use std::io::Read;
+use std::process::Command;
+use std::sync::Arc;
+use test_util as util;
+use test_util::TempDir;
+use tokio::task::LocalSet;
+
+itest_flaky!(cafile_url_imports {
+ args: "run --quiet --reload --cert tls/RootCA.pem cert/cafile_url_imports.ts",
+ output: "cert/cafile_url_imports.ts.out",
+ http_server: true,
+});
+
+itest_flaky!(cafile_ts_fetch {
+ args:
+ "run --quiet --reload --allow-net --cert tls/RootCA.pem cert/cafile_ts_fetch.ts",
+ output: "cert/cafile_ts_fetch.ts.out",
+ http_server: true,
+});
+
+itest_flaky!(cafile_eval {
+ args: "eval --cert tls/RootCA.pem fetch('https://localhost:5545/cert/cafile_ts_fetch.ts.out').then(r=>r.text()).then(t=>console.log(t.trimEnd()))",
+ output: "cert/cafile_ts_fetch.ts.out",
+ http_server: true,
+});
+
+itest_flaky!(cafile_info {
+ args:
+ "info --quiet --cert tls/RootCA.pem https://localhost:5545/cert/cafile_info.ts",
+ output: "cert/cafile_info.ts.out",
+ http_server: true,
+});
+
+itest_flaky!(cafile_url_imports_unsafe_ssl {
+ args: "run --quiet --reload --unsafely-ignore-certificate-errors=localhost cert/cafile_url_imports.ts",
+ output: "cert/cafile_url_imports_unsafe_ssl.ts.out",
+ http_server: true,
+});
+
+itest_flaky!(cafile_ts_fetch_unsafe_ssl {
+ args:
+ "run --quiet --reload --allow-net --unsafely-ignore-certificate-errors cert/cafile_ts_fetch.ts",
+ output: "cert/cafile_ts_fetch_unsafe_ssl.ts.out",
+ http_server: true,
+});
+
+itest!(deno_land_unsafe_ssl {
+ args:
+ "run --quiet --reload --allow-net --unsafely-ignore-certificate-errors=deno.land cert/deno_land_unsafe_ssl.ts",
+ output: "cert/deno_land_unsafe_ssl.ts.out",
+});
+
+itest!(ip_address_unsafe_ssl {
+ args:
+ "run --quiet --reload --allow-net --unsafely-ignore-certificate-errors=1.1.1.1 cert/ip_address_unsafe_ssl.ts",
+ output: "cert/ip_address_unsafe_ssl.ts.out",
+});
+
+itest!(localhost_unsafe_ssl {
+ args:
+ "run --quiet --reload --allow-net --unsafely-ignore-certificate-errors=deno.land cert/cafile_url_imports.ts",
+ output: "cert/localhost_unsafe_ssl.ts.out",
+ http_server: true,
+ exit_code: 1,
+});
+
+#[flaky_test::flaky_test]
+fn cafile_env_fetch() {
+ use deno_core::url::Url;
+ let _g = util::http_server();
+ let deno_dir = TempDir::new();
+ let module_url =
+ Url::parse("https://localhost:5545/cert/cafile_url_imports.ts").unwrap();
+ let cafile = util::testdata_path().join("tls/RootCA.pem");
+ let output = Command::new(util::deno_exe_path())
+ .env("DENO_DIR", deno_dir.path())
+ .env("DENO_CERT", cafile)
+ .current_dir(util::testdata_path())
+ .arg("cache")
+ .arg(module_url.to_string())
+ .output()
+ .expect("Failed to spawn script");
+ assert!(output.status.success());
+}
+
+#[flaky_test::flaky_test]
+fn cafile_fetch() {
+ use deno_core::url::Url;
+ let _g = util::http_server();
+ let deno_dir = TempDir::new();
+ let module_url =
+ Url::parse("http://localhost:4545/cert/cafile_url_imports.ts").unwrap();
+ let cafile = util::testdata_path().join("tls/RootCA.pem");
+ let output = Command::new(util::deno_exe_path())
+ .env("DENO_DIR", deno_dir.path())
+ .current_dir(util::testdata_path())
+ .arg("cache")
+ .arg("--cert")
+ .arg(cafile)
+ .arg(module_url.to_string())
+ .output()
+ .expect("Failed to spawn script");
+ assert!(output.status.success());
+ let out = std::str::from_utf8(&output.stdout).unwrap();
+ assert_eq!(out, "");
+}
+
+#[flaky_test::flaky_test]
+fn cafile_install_remote_module() {
+ let _g = util::http_server();
+ let temp_dir = TempDir::new();
+ let bin_dir = temp_dir.path().join("bin");
+ std::fs::create_dir(&bin_dir).unwrap();
+ let deno_dir = TempDir::new();
+ let cafile = util::testdata_path().join("tls/RootCA.pem");
+
+ let install_output = Command::new(util::deno_exe_path())
+ .env("DENO_DIR", deno_dir.path())
+ .current_dir(util::testdata_path())
+ .arg("install")
+ .arg("--cert")
+ .arg(cafile)
+ .arg("--root")
+ .arg(temp_dir.path())
+ .arg("-n")
+ .arg("echo_test")
+ .arg("https://localhost:5545/echo.ts")
+ .output()
+ .expect("Failed to spawn script");
+ println!("{}", std::str::from_utf8(&install_output.stdout).unwrap());
+ eprintln!("{}", std::str::from_utf8(&install_output.stderr).unwrap());
+ assert!(install_output.status.success());
+
+ let mut echo_test_path = bin_dir.join("echo_test");
+ if cfg!(windows) {
+ echo_test_path = echo_test_path.with_extension("cmd");
+ }
+ assert!(echo_test_path.exists());
+
+ let output = Command::new(echo_test_path)
+ .current_dir(temp_dir.path())
+ .arg("foo")
+ .env("PATH", util::target_dir())
+ .output()
+ .expect("failed to spawn script");
+ let stdout = std::str::from_utf8(&output.stdout).unwrap().trim();
+ assert!(stdout.ends_with("foo"));
+}
+
+#[flaky_test::flaky_test]
+fn cafile_bundle_remote_exports() {
+ let _g = util::http_server();
+
+ // First we have to generate a bundle of some remote module that has exports.
+ let mod1 = "https://localhost:5545/subdir/mod1.ts";
+ let cafile = util::testdata_path().join("tls/RootCA.pem");
+ let t = TempDir::new();
+ let bundle = t.path().join("mod1.bundle.js");
+ let mut deno = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .arg("bundle")
+ .arg("--cert")
+ .arg(cafile)
+ .arg(mod1)
+ .arg(&bundle)
+ .spawn()
+ .expect("failed to spawn script");
+ let status = deno.wait().expect("failed to wait for the child process");
+ assert!(status.success());
+ assert!(bundle.is_file());
+
+ // Now we try to use that bundle from another module.
+ let test = t.path().join("test.js");
+ std::fs::write(
+ &test,
+ "
+ import { printHello3 } from \"./mod1.bundle.js\";
+ printHello3(); ",
+ )
+ .expect("error writing file");
+
+ let output = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .arg("run")
+ .arg("--check")
+ .arg(&test)
+ .output()
+ .expect("failed to spawn script");
+ // check the output of the test.ts program.
+ assert!(std::str::from_utf8(&output.stdout)
+ .unwrap()
+ .trim()
+ .ends_with("Hello"));
+ assert_eq!(output.stderr, b"");
+}
+
+#[tokio::test]
+async fn listen_tls_alpn() {
+ // TLS streams require the presence of an ambient local task set to gracefully
+ // close dropped connections in the background.
+ LocalSet::new()
+ .run_until(async {
+ let mut child = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .arg("run")
+ .arg("--unstable")
+ .arg("--quiet")
+ .arg("--allow-net")
+ .arg("--allow-read")
+ .arg("./cert/listen_tls_alpn.ts")
+ .arg("4504")
+ .stdout(std::process::Stdio::piped())
+ .spawn()
+ .unwrap();
+ let stdout = child.stdout.as_mut().unwrap();
+ let mut msg = [0; 5];
+ let read = stdout.read(&mut msg).unwrap();
+ assert_eq!(read, 5);
+ assert_eq!(&msg, b"READY");
+
+ let mut reader = &mut BufReader::new(Cursor::new(include_bytes!(
+ "../testdata/tls/RootCA.crt"
+ )));
+ let certs = rustls_pemfile::certs(&mut reader).unwrap();
+ let mut root_store = rustls::RootCertStore::empty();
+ root_store.add_parsable_certificates(&certs);
+ let mut cfg = rustls::ClientConfig::builder()
+ .with_safe_defaults()
+ .with_root_certificates(root_store)
+ .with_no_client_auth();
+ cfg.alpn_protocols.push(b"foobar".to_vec());
+ let cfg = Arc::new(cfg);
+
+ let hostname = rustls::ServerName::try_from("localhost").unwrap();
+
+ let tcp_stream = tokio::net::TcpStream::connect("localhost:4504")
+ .await
+ .unwrap();
+ let mut tls_stream =
+ TlsStream::new_client_side(tcp_stream, cfg, hostname);
+
+ tls_stream.handshake().await.unwrap();
+
+ let (_, rustls_connection) = tls_stream.get_ref();
+ let alpn = rustls_connection.alpn_protocol().unwrap();
+ assert_eq!(alpn, b"foobar");
+
+ let status = child.wait().unwrap();
+ assert!(status.success());
+ })
+ .await;
+}
+
+#[tokio::test]
+async fn listen_tls_alpn_fail() {
+ // TLS streams require the presence of an ambient local task set to gracefully
+ // close dropped connections in the background.
+ LocalSet::new()
+ .run_until(async {
+ let mut child = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .arg("run")
+ .arg("--unstable")
+ .arg("--quiet")
+ .arg("--allow-net")
+ .arg("--allow-read")
+ .arg("./cert/listen_tls_alpn_fail.ts")
+ .arg("4505")
+ .stdout(std::process::Stdio::piped())
+ .spawn()
+ .unwrap();
+ let stdout = child.stdout.as_mut().unwrap();
+ let mut msg = [0; 5];
+ let read = stdout.read(&mut msg).unwrap();
+ assert_eq!(read, 5);
+ assert_eq!(&msg, b"READY");
+
+ let mut reader = &mut BufReader::new(Cursor::new(include_bytes!(
+ "../testdata/tls/RootCA.crt"
+ )));
+ let certs = rustls_pemfile::certs(&mut reader).unwrap();
+ let mut root_store = rustls::RootCertStore::empty();
+ root_store.add_parsable_certificates(&certs);
+ let mut cfg = rustls::ClientConfig::builder()
+ .with_safe_defaults()
+ .with_root_certificates(root_store)
+ .with_no_client_auth();
+ cfg.alpn_protocols.push(b"boofar".to_vec());
+ let cfg = Arc::new(cfg);
+
+ let hostname = rustls::ServerName::try_from("localhost").unwrap();
+
+ let tcp_stream = tokio::net::TcpStream::connect("localhost:4505")
+ .await
+ .unwrap();
+ let mut tls_stream =
+ TlsStream::new_client_side(tcp_stream, cfg, hostname);
+
+ tls_stream.handshake().await.unwrap_err();
+
+ let (_, rustls_connection) = tls_stream.get_ref();
+ assert!(rustls_connection.alpn_protocol().is_none());
+
+ let status = child.wait().unwrap();
+ assert!(status.success());
+ })
+ .await;
+}
diff --git a/cli/tests/integration/check_tests.rs b/cli/tests/integration/check_tests.rs
index 5ceaffe51..ab96670ef 100644
--- a/cli/tests/integration/check_tests.rs
+++ b/cli/tests/integration/check_tests.rs
@@ -1,50 +1,52 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+use std::process::Command;
use std::process::Stdio;
use crate::itest;
use test_util as util;
+use util::TempDir;
itest!(_095_check_with_bare_import {
- args: "check 095_cache_with_bare_import.ts",
- output: "095_cache_with_bare_import.ts.out",
+ args: "check cache/095_cache_with_bare_import.ts",
+ output: "cache/095_cache_with_bare_import.ts.out",
exit_code: 1,
});
itest!(check_extensionless {
args: "check --reload http://localhost:4545/subdir/no_js_ext",
- output: "cache_extensionless.out",
+ output: "cache/cache_extensionless.out",
http_server: true,
});
itest!(check_random_extension {
args: "check --reload http://localhost:4545/subdir/no_js_ext@1.0.0",
- output: "cache_random_extension.out",
+ output: "cache/cache_random_extension.out",
http_server: true,
});
itest!(check_all {
- args: "check --quiet --remote check_all.ts",
- output: "check_all.out",
+ args: "check --quiet --remote check/check_all.ts",
+ output: "check/check_all.out",
http_server: true,
exit_code: 1,
});
itest!(check_all_local {
- args: "check --quiet check_all.ts",
+ args: "check --quiet check/check_all.ts",
output_str: Some(""),
http_server: true,
});
itest!(module_detection_force {
- args: "check --quiet module_detection_force.ts",
+ args: "check --quiet check/module_detection_force/main.ts",
output_str: Some(""),
});
// Regression test for https://github.com/denoland/deno/issues/14937.
itest!(declaration_header_file_with_no_exports {
- args: "check --quiet declaration_header_file_with_no_exports.ts",
+ args: "check --quiet check/declaration_header_file_with_no_exports.ts",
output_str: Some(""),
});
@@ -106,3 +108,91 @@ fn reload_flag() {
stderr.contains("Check")
}
}
+
+#[test]
+fn typecheck_declarations_ns() {
+ let output = util::deno_cmd()
+ .arg("test")
+ .arg("--doc")
+ .arg(util::root_path().join("cli/dts/lib.deno.ns.d.ts"))
+ .output()
+ .unwrap();
+ println!("stdout: {}", String::from_utf8(output.stdout).unwrap());
+ println!("stderr: {}", String::from_utf8(output.stderr).unwrap());
+ assert!(output.status.success());
+}
+
+#[test]
+fn typecheck_declarations_unstable() {
+ let output = util::deno_cmd()
+ .arg("test")
+ .arg("--doc")
+ .arg("--unstable")
+ .arg(util::root_path().join("cli/dts/lib.deno.unstable.d.ts"))
+ .output()
+ .unwrap();
+ println!("stdout: {}", String::from_utf8(output.stdout).unwrap());
+ println!("stderr: {}", String::from_utf8(output.stderr).unwrap());
+ assert!(output.status.success());
+}
+
+#[test]
+fn typecheck_core() {
+ let deno_dir = TempDir::new();
+ let test_file = deno_dir.path().join("test_deno_core_types.ts");
+ std::fs::write(
+ &test_file,
+ format!(
+ "import \"{}\";",
+ deno_core::resolve_path(
+ util::root_path()
+ .join("core/lib.deno_core.d.ts")
+ .to_str()
+ .unwrap()
+ )
+ .unwrap()
+ ),
+ )
+ .unwrap();
+ let output = util::deno_cmd_with_deno_dir(&deno_dir)
+ .arg("run")
+ .arg(test_file.to_str().unwrap())
+ .output()
+ .unwrap();
+ println!("stdout: {}", String::from_utf8(output.stdout).unwrap());
+ println!("stderr: {}", String::from_utf8(output.stderr).unwrap());
+ assert!(output.status.success());
+}
+
+#[test]
+fn ts_no_recheck_on_redirect() {
+ let deno_dir = util::new_deno_dir();
+ let e = util::deno_exe_path();
+
+ let redirect_ts = util::testdata_path().join("run/017_import_redirect.ts");
+ assert!(redirect_ts.is_file());
+ let mut cmd = Command::new(e.clone());
+ cmd.env("DENO_DIR", deno_dir.path());
+ let mut initial = cmd
+ .current_dir(util::testdata_path())
+ .arg("run")
+ .arg("--check")
+ .arg(redirect_ts.clone())
+ .spawn()
+ .expect("failed to span script");
+ let status_initial =
+ initial.wait().expect("failed to wait for child process");
+ assert!(status_initial.success());
+
+ let mut cmd = Command::new(e);
+ cmd.env("DENO_DIR", deno_dir.path());
+ let output = cmd
+ .current_dir(util::testdata_path())
+ .arg("run")
+ .arg("--check")
+ .arg(redirect_ts)
+ .output()
+ .expect("failed to spawn script");
+
+ assert!(std::str::from_utf8(&output.stderr).unwrap().is_empty());
+}
diff --git a/cli/tests/integration/compile_tests.rs b/cli/tests/integration/compile_tests.rs
index 5c9a7f074..dea17e598 100644
--- a/cli/tests/integration/compile_tests.rs
+++ b/cli/tests/integration/compile_tests.rs
@@ -53,7 +53,7 @@ fn standalone_args() {
.arg("--unstable")
.arg("--output")
.arg(&exe)
- .arg("./028_args.ts")
+ .arg("./compile/args.ts")
.arg("a")
.arg("b")
.stdout(std::process::Stdio::piped())
@@ -90,7 +90,7 @@ fn standalone_error() {
.arg("--unstable")
.arg("--output")
.arg(&exe)
- .arg("./standalone_error.ts")
+ .arg("./compile/standalone_error.ts")
.stdout(std::process::Stdio::piped())
.spawn()
.unwrap()
@@ -135,7 +135,7 @@ fn standalone_error_module_with_imports() {
.arg("--unstable")
.arg("--output")
.arg(&exe)
- .arg("./standalone_error_module_with_imports_1.ts")
+ .arg("./compile/standalone_error_module_with_imports_1.ts")
.stdout(std::process::Stdio::piped())
.spawn()
.unwrap()
@@ -177,7 +177,7 @@ fn standalone_load_datauri() {
.arg("--unstable")
.arg("--output")
.arg(&exe)
- .arg("./standalone_import_datauri.ts")
+ .arg("./compile/standalone_import_datauri.ts")
.stdout(std::process::Stdio::piped())
.spawn()
.unwrap()
@@ -210,7 +210,7 @@ fn standalone_follow_redirects() {
.arg("--unstable")
.arg("--output")
.arg(&exe)
- .arg("./standalone_follow_redirects.ts")
+ .arg("./compile/standalone_follow_redirects.ts")
.stdout(std::process::Stdio::piped())
.spawn()
.unwrap()
@@ -244,7 +244,7 @@ fn compile_with_file_exists_error() {
.arg("--unstable")
.arg("--output")
.arg(&output_path)
- .arg("./028_args.ts")
+ .arg("./compile/args.ts")
.stderr(std::process::Stdio::piped())
.spawn()
.unwrap()
@@ -278,7 +278,7 @@ fn compile_with_directory_exists_error() {
.arg("--unstable")
.arg("--output")
.arg(&exe)
- .arg("./028_args.ts")
+ .arg("./compile/args.ts")
.stderr(std::process::Stdio::piped())
.spawn()
.unwrap()
@@ -312,7 +312,7 @@ fn compile_with_conflict_file_exists_error() {
.arg("--unstable")
.arg("--output")
.arg(&exe)
- .arg("./028_args.ts")
+ .arg("./compile/args.ts")
.stderr(std::process::Stdio::piped())
.spawn()
.unwrap()
@@ -349,7 +349,7 @@ fn compile_and_overwrite_file() {
.arg("--unstable")
.arg("--output")
.arg(&exe)
- .arg("./028_args.ts")
+ .arg("./compile/args.ts")
.stderr(std::process::Stdio::piped())
.spawn()
.unwrap()
@@ -364,7 +364,7 @@ fn compile_and_overwrite_file() {
.arg("--unstable")
.arg("--output")
.arg(&exe)
- .arg("./028_args.ts")
+ .arg("./compile/args.ts")
.stderr(std::process::Stdio::piped())
.spawn()
.unwrap()
@@ -390,7 +390,7 @@ fn standalone_runtime_flags() {
.arg("1")
.arg("--output")
.arg(&exe)
- .arg("./standalone_runtime_flags.ts")
+ .arg("./compile/standalone_runtime_flags.ts")
.stdout(std::process::Stdio::piped())
.spawn()
.unwrap()
@@ -426,10 +426,10 @@ fn standalone_import_map() {
.arg("--unstable")
.arg("--allow-read")
.arg("--import-map")
- .arg("standalone_import_map.json")
+ .arg("compile/standalone_import_map.json")
.arg("--output")
.arg(&exe)
- .arg("./standalone_import_map.ts")
+ .arg("./compile/standalone_import_map.ts")
.stdout(std::process::Stdio::piped())
.spawn()
.unwrap()
@@ -461,7 +461,7 @@ fn skip_rebundle() {
.arg("--unstable")
.arg("--output")
.arg(&exe)
- .arg("./001_hello.js")
+ .arg("./run/001_hello.js")
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
.spawn()
@@ -470,7 +470,7 @@ fn skip_rebundle() {
.unwrap();
assert!(output.status.success());
- //no "Bundle testdata_path/001_hello.js" in output
+ //no "Bundle testdata_path/run/001_hello.js" in output
assert!(!String::from_utf8(output.stderr).unwrap().contains("Bundle"));
let output = Command::new(exe)
diff --git a/cli/tests/integration/doc_tests.rs b/cli/tests/integration/doc_tests.rs
index f225eeb2c..4309d9754 100644
--- a/cli/tests/integration/doc_tests.rs
+++ b/cli/tests/integration/doc_tests.rs
@@ -8,7 +8,7 @@ use crate::itest;
itest!(deno_doc_builtin {
args: "doc",
- output: "deno_doc_builtin.out",
+ output: "doc/deno_doc_builtin.out",
});
#[test]
@@ -19,7 +19,7 @@ fn deno_doc() {
let output = util::deno_cmd_with_deno_dir(&dir)
.current_dir(util::testdata_path())
.arg("doc")
- .arg("deno_doc.ts")
+ .arg("doc/deno_doc.ts")
.env("NO_COLOR", "1")
.stdout(std::process::Stdio::piped())
.spawn()
@@ -56,8 +56,9 @@ itest!(deno_doc_types_header {
});
itest!(_060_deno_doc_displays_all_overloads_in_details_view {
- args: "doc 060_deno_doc_displays_all_overloads_in_details_view.ts NS.test",
- output: "060_deno_doc_displays_all_overloads_in_details_view.ts.out",
+ args:
+ "doc doc/060_deno_doc_displays_all_overloads_in_details_view.ts NS.test",
+ output: "doc/060_deno_doc_displays_all_overloads_in_details_view.ts.out",
});
itest!(deno_doc_types_header_direct {
diff --git a/cli/tests/integration/eval_tests.rs b/cli/tests/integration/eval_tests.rs
index 892ca7ffd..2d560812e 100644
--- a/cli/tests/integration/eval_tests.rs
+++ b/cli/tests/integration/eval_tests.rs
@@ -44,27 +44,27 @@ fn eval_randomness() {
assert!(numbers.len() > 1);
}
-itest!(_029_eval {
+itest!(eval_basic {
args: "eval console.log(\"hello\")",
- output: "029_eval.out",
+ output_str: Some("hello\n"),
});
// Ugly parentheses due to whitespace delimiting problem.
-itest!(_030_eval_ts {
+itest!(eval_ts {
args: "eval --quiet --ext=ts console.log((123)as(number))", // 'as' is a TS keyword only
- output: "030_eval_ts.out",
+ output_str: Some("123\n"),
});
-itest!(_041_dyn_import_eval {
+itest!(dyn_import_eval {
args: "eval import('./subdir/mod4.js').then(console.log)",
- output: "041_dyn_import_eval.out",
+ output: "eval/dyn_import_eval.out",
});
// Cannot write the expression to evaluate as "console.log(typeof gc)"
// because itest! splits args on whitespace.
itest!(v8_flags_eval {
args: "eval --v8-flags=--expose-gc console.log(typeof(gc))",
- output: "v8_flags.js.out",
+ output: "run/v8_flags.js.out",
});
itest!(check_local_by_default {
diff --git a/cli/tests/integration/flags_tests.rs b/cli/tests/integration/flags_tests.rs
new file mode 100644
index 000000000..5e3814e22
--- /dev/null
+++ b/cli/tests/integration/flags_tests.rs
@@ -0,0 +1,45 @@
+// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
+
+use crate::itest;
+use test_util as util;
+
+#[test]
+fn help_flag() {
+ let status = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .arg("--help")
+ .spawn()
+ .unwrap()
+ .wait()
+ .unwrap();
+ assert!(status.success());
+}
+
+#[test]
+fn version_short_flag() {
+ let status = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .arg("-V")
+ .spawn()
+ .unwrap()
+ .wait()
+ .unwrap();
+ assert!(status.success());
+}
+
+#[test]
+fn version_long_flag() {
+ let status = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .arg("--version")
+ .spawn()
+ .unwrap()
+ .wait()
+ .unwrap();
+ assert!(status.success());
+}
+
+itest!(types {
+ args: "types",
+ output: "types/types.out",
+});
diff --git a/cli/tests/integration/fmt_tests.rs b/cli/tests/integration/fmt_tests.rs
index 048e9aa21..53b45de19 100644
--- a/cli/tests/integration/fmt_tests.rs
+++ b/cli/tests/integration/fmt_tests.rs
@@ -7,29 +7,29 @@ use test_util::TempDir;
#[test]
fn fmt_test() {
let t = TempDir::new();
- let fixed_js = util::testdata_path().join("badly_formatted_fixed.js");
+ let testdata_fmt_dir = util::testdata_path().join("fmt");
+ let fixed_js = testdata_fmt_dir.join("badly_formatted_fixed.js");
let badly_formatted_original_js =
- util::testdata_path().join("badly_formatted.mjs");
+ testdata_fmt_dir.join("badly_formatted.mjs");
let badly_formatted_js = t.path().join("badly_formatted.js");
let badly_formatted_js_str = badly_formatted_js.to_str().unwrap();
std::fs::copy(&badly_formatted_original_js, &badly_formatted_js).unwrap();
- let fixed_md = util::testdata_path().join("badly_formatted_fixed.md");
- let badly_formatted_original_md =
- util::testdata_path().join("badly_formatted.md");
+ let fixed_md = testdata_fmt_dir.join("badly_formatted_fixed.md");
+ let badly_formatted_original_md = testdata_fmt_dir.join("badly_formatted.md");
let badly_formatted_md = t.path().join("badly_formatted.md");
let badly_formatted_md_str = badly_formatted_md.to_str().unwrap();
std::fs::copy(&badly_formatted_original_md, &badly_formatted_md).unwrap();
- let fixed_json = util::testdata_path().join("badly_formatted_fixed.json");
+ let fixed_json = testdata_fmt_dir.join("badly_formatted_fixed.json");
let badly_formatted_original_json =
- util::testdata_path().join("badly_formatted.json");
+ testdata_fmt_dir.join("badly_formatted.json");
let badly_formatted_json = t.path().join("badly_formatted.json");
let badly_formatted_json_str = badly_formatted_json.to_str().unwrap();
std::fs::copy(&badly_formatted_original_json, &badly_formatted_json).unwrap();
// First, check formatting by ignoring the badly formatted file.
let status = util::deno_cmd()
- .current_dir(util::testdata_path())
+ .current_dir(&testdata_fmt_dir)
.arg("fmt")
.arg(format!(
"--ignore={},{},{}",
@@ -48,7 +48,7 @@ fn fmt_test() {
// Check without ignore.
let status = util::deno_cmd()
- .current_dir(util::testdata_path())
+ .current_dir(&testdata_fmt_dir)
.arg("fmt")
.arg("--check")
.arg(badly_formatted_js_str)
@@ -62,7 +62,7 @@ fn fmt_test() {
// Format the source file.
let status = util::deno_cmd()
- .current_dir(util::testdata_path())
+ .current_dir(&testdata_fmt_dir)
.arg("fmt")
.arg(badly_formatted_js_str)
.arg(badly_formatted_md_str)
diff --git a/cli/tests/integration/info_tests.rs b/cli/tests/integration/info_tests.rs
index aa678cb6d..0cb875078 100644
--- a/cli/tests/integration/info_tests.rs
+++ b/cli/tests/integration/info_tests.rs
@@ -8,7 +8,7 @@ use test_util::TempDir;
#[test]
fn info_with_compiled_source() {
let _g = util::http_server();
- let module_path = "http://127.0.0.1:4545/048_media_types_jsx.ts";
+ let module_path = "http://127.0.0.1:4545/run/048_media_types_jsx.ts";
let t = TempDir::new();
let mut deno = util::deno_cmd()
@@ -37,79 +37,79 @@ fn info_with_compiled_source() {
assert_eq!(output.stderr, b"");
}
-itest!(_022_info_flag_script {
- args: "info http://127.0.0.1:4545/019_media_types.ts",
- output: "022_info_flag_script.out",
+itest!(multiple_imports {
+ args: "info http://127.0.0.1:4545/run/019_media_types.ts",
+ output: "info/multiple_imports.out",
http_server: true,
});
-itest!(_031_info_ts_error {
- args: "info 031_info_ts_error.ts",
- output: "031_info_ts_error.out",
+itest!(info_ts_error {
+ args: "info info/031_info_ts_error.ts",
+ output: "info/031_info_ts_error.out",
});
-itest!(_041_info_flag {
+itest!(info_flag {
args: "info",
- output: "041_info_flag.out",
+ output: "info/041_info_flag.out",
});
-itest!(_042_info_flag_location {
+itest!(info_flag_location {
args: "info --location https://deno.land",
- output: "041_info_flag_location.out",
+ output: "info/041_info_flag_location.out",
});
itest!(info_json {
args: "info --json --unstable",
- output: "info_json.out",
+ output: "info/info_json.out",
});
itest!(info_json_location {
args: "info --json --unstable --location https://deno.land",
- output: "info_json_location.out",
+ output: "info/info_json_location.out",
});
-itest!(_049_info_flag_script_jsx {
- args: "info http://127.0.0.1:4545/048_media_types_jsx.ts",
- output: "049_info_flag_script_jsx.out",
+itest!(info_flag_script_jsx {
+ args: "info http://127.0.0.1:4545/run/048_media_types_jsx.ts",
+ output: "info/049_info_flag_script_jsx.out",
http_server: true,
});
-itest!(_055_info_file_json {
- args: "info --quiet --json --unstable 005_more_imports.ts",
- output: "055_info_file_json.out",
+itest!(json_file {
+ args: "info --quiet --json --unstable info/json_output/main.ts",
+ output: "info/json_output/main.out",
exit_code: 0,
});
-itest!(_065_import_map_info {
+itest!(import_map_info {
args:
"info --quiet --import-map=import_maps/import_map.json import_maps/test.ts",
- output: "065_import_map_info.out",
+ output: "info/065_import_map_info.out",
});
-itest!(_076_info_json_deps_order {
- args: "info --unstable --json 076_info_json_deps_order.ts",
- output: "076_info_json_deps_order.out",
+itest!(info_json_deps_order {
+ args: "info --unstable --json info/076_info_json_deps_order.ts",
+ output: "info/076_info_json_deps_order.out",
});
itest!(info_missing_module {
- args: "info error_009_missing_js_module.js",
- output: "info_missing_module.out",
+ args: "info info/error_009_missing_js_module.js",
+ output: "info/info_missing_module.out",
});
itest!(info_recursive_modules {
- args: "info --quiet info_recursive_imports_test.ts",
- output: "info_recursive_imports_test.out",
+ args: "info --quiet info/info_recursive_imports_test.ts",
+ output: "info/info_recursive_imports_test.out",
exit_code: 0,
});
itest!(info_type_import {
- args: "info info_type_import.ts",
- output: "info_type_import.out",
+ args: "info info/info_type_import.ts",
+ output: "info/info_type_import.out",
});
itest!(_054_info_local_imports {
- args: "info --quiet 005_more_imports.ts",
- output: "054_info_local_imports.out",
+ args: "info --quiet run/005_more_imports.ts",
+ output: "info/054_info_local_imports.out",
exit_code: 0,
});
@@ -120,13 +120,13 @@ itest!(data_null_error {
output: "info/data_null_error/data_null_error.out",
});
-itest!(deno_info_types_header_direct {
- args: "info --reload type_directives_01.ts",
+itest!(types_header_direct {
+ args: "info --reload run/type_directives_01.ts",
output: "info/types_header.out",
http_server: true,
});
-itest!(deno_info_with_config_override {
+itest!(with_config_override {
args: "info info/with_config/test.ts --config info/with_config/deno-override.json --import-map info/with_config/import_map.json",
output: "info/with_config/with_config.out",
});
diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs
index 7e75e852b..d49a8a814 100644
--- a/cli/tests/integration/lsp_tests.rs
+++ b/cli/tests/integration/lsp_tests.rs
@@ -4107,8 +4107,8 @@ fn lsp_diagnostics_warn_redirect() {
severity: Some(lsp::DiagnosticSeverity::INFORMATION),
code: Some(lsp::NumberOrString::String("redirect".to_string())),
source: Some("deno".to_string()),
- message: "The import of \"http://127.0.0.1:4545/x_deno_warning.js\" was redirected to \"http://127.0.0.1:4545/x_deno_warning_redirect.js\".".to_string(),
- data: Some(json!({"specifier": "http://127.0.0.1:4545/x_deno_warning.js", "redirect": "http://127.0.0.1:4545/x_deno_warning_redirect.js"})),
+ message: "The import of \"http://127.0.0.1:4545/x_deno_warning.js\" was redirected to \"http://127.0.0.1:4545/lsp/x_deno_warning_redirect.js\".".to_string(),
+ data: Some(json!({"specifier": "http://127.0.0.1:4545/x_deno_warning.js", "redirect": "http://127.0.0.1:4545/lsp/x_deno_warning_redirect.js"})),
..Default::default()
}
],
diff --git a/cli/tests/integration/mod.rs b/cli/tests/integration/mod.rs
index 143bda819..373d04e70 100644
--- a/cli/tests/integration/mod.rs
+++ b/cli/tests/integration/mod.rs
@@ -1,22 +1,6 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
-use crate::itest;
-use deno_core::url;
-use deno_runtime::deno_fetch::reqwest;
-use deno_runtime::deno_net::ops_tls::TlsStream;
-use deno_runtime::deno_tls::rustls;
-use deno_runtime::deno_tls::rustls_pemfile;
-use std::fs;
-use std::io::BufReader;
-use std::io::Cursor;
-use std::io::{Read, Write};
-use std::process::Command;
-use std::sync::Arc;
use test_util as util;
-use test_util::TempDir;
-use tokio::task::LocalSet;
-use trust_dns_client::serialize::txt::Lexer;
-use trust_dns_client::serialize::txt::Parser;
#[macro_export]
macro_rules! itest(
@@ -58,6 +42,8 @@ mod bench;
mod bundle;
#[path = "cache_tests.rs"]
mod cache;
+#[path = "cert_tests.rs"]
+mod cert;
#[path = "check_tests.rs"]
mod check;
#[path = "compile_tests.rs"]
@@ -68,6 +54,8 @@ mod coverage;
mod doc;
#[path = "eval_tests.rs"]
mod eval;
+#[path = "flags_tests.rs"]
+mod flags;
#[path = "fmt_tests.rs"]
mod fmt;
#[path = "info_tests.rs"]
@@ -102,917 +90,6 @@ mod watcher;
mod worker;
#[test]
-fn help_flag() {
- let status = util::deno_cmd()
- .current_dir(util::testdata_path())
- .arg("--help")
- .spawn()
- .unwrap()
- .wait()
- .unwrap();
- assert!(status.success());
-}
-
-#[test]
-fn version_short_flag() {
- let status = util::deno_cmd()
- .current_dir(util::testdata_path())
- .arg("-V")
- .spawn()
- .unwrap()
- .wait()
- .unwrap();
- assert!(status.success());
-}
-
-#[test]
-fn version_long_flag() {
- let status = util::deno_cmd()
- .current_dir(util::testdata_path())
- .arg("--version")
- .spawn()
- .unwrap()
- .wait()
- .unwrap();
- assert!(status.success());
-}
-
-itest!(types {
- args: "types",
- output: "types.out",
-});
-
-#[test]
-fn cache_test() {
- let _g = util::http_server();
- let deno_dir = TempDir::new();
- let module_url =
- url::Url::parse("http://localhost:4545/006_url_imports.ts").unwrap();
- let output = Command::new(util::deno_exe_path())
- .env("DENO_DIR", deno_dir.path())
- .current_dir(util::testdata_path())
- .arg("cache")
- .arg("--check=all")
- .arg("-L")
- .arg("debug")
- .arg(module_url.to_string())
- .output()
- .expect("Failed to spawn script");
- assert!(output.status.success());
-
- let prg = util::deno_exe_path();
- let output = Command::new(&prg)
- .env("DENO_DIR", deno_dir.path())
- .env("HTTP_PROXY", "http://nil")
- .env("NO_COLOR", "1")
- .current_dir(util::testdata_path())
- .arg("run")
- .arg(module_url.to_string())
- .output()
- .expect("Failed to spawn script");
-
- let str_output = std::str::from_utf8(&output.stdout).unwrap();
-
- let module_output_path = util::testdata_path().join("006_url_imports.ts.out");
- let mut module_output = String::new();
- let mut module_output_file = fs::File::open(module_output_path).unwrap();
- module_output_file
- .read_to_string(&mut module_output)
- .unwrap();
-
- assert_eq!(module_output, str_output);
-}
-
-#[test]
-fn cache_invalidation_test() {
- let deno_dir = TempDir::new();
- let fixture_path = deno_dir.path().join("fixture.ts");
- {
- let mut file = std::fs::File::create(fixture_path.clone())
- .expect("could not create fixture");
- file
- .write_all(b"console.log(\"42\");")
- .expect("could not write fixture");
- }
- let output = Command::new(util::deno_exe_path())
- .env("DENO_DIR", deno_dir.path())
- .current_dir(util::testdata_path())
- .arg("run")
- .arg(fixture_path.to_str().unwrap())
- .output()
- .expect("Failed to spawn script");
- assert!(output.status.success());
- let actual = std::str::from_utf8(&output.stdout).unwrap();
- assert_eq!(actual, "42\n");
- {
- let mut file = std::fs::File::create(fixture_path.clone())
- .expect("could not create fixture");
- file
- .write_all(b"console.log(\"43\");")
- .expect("could not write fixture");
- }
- let output = Command::new(util::deno_exe_path())
- .env("DENO_DIR", deno_dir.path())
- .current_dir(util::testdata_path())
- .arg("run")
- .arg(fixture_path.to_str().unwrap())
- .output()
- .expect("Failed to spawn script");
- assert!(output.status.success());
- let actual = std::str::from_utf8(&output.stdout).unwrap();
- assert_eq!(actual, "43\n");
-}
-
-#[test]
-fn cache_invalidation_test_no_check() {
- let deno_dir = TempDir::new();
- let fixture_path = deno_dir.path().join("fixture.ts");
- {
- let mut file = std::fs::File::create(fixture_path.clone())
- .expect("could not create fixture");
- file
- .write_all(b"console.log(\"42\");")
- .expect("could not write fixture");
- }
- let output = Command::new(util::deno_exe_path())
- .env("DENO_DIR", deno_dir.path())
- .current_dir(util::testdata_path())
- .arg("run")
- .arg("--no-check")
- .arg(fixture_path.to_str().unwrap())
- .output()
- .expect("Failed to spawn script");
- assert!(output.status.success());
- let actual = std::str::from_utf8(&output.stdout).unwrap();
- assert_eq!(actual, "42\n");
- {
- let mut file = std::fs::File::create(fixture_path.clone())
- .expect("could not create fixture");
- file
- .write_all(b"console.log(\"43\");")
- .expect("could not write fixture");
- }
- let output = Command::new(util::deno_exe_path())
- .env("DENO_DIR", deno_dir.path())
- .current_dir(util::testdata_path())
- .arg("run")
- .arg("--no-check")
- .arg(fixture_path.to_str().unwrap())
- .output()
- .expect("Failed to spawn script");
- assert!(output.status.success());
- let actual = std::str::from_utf8(&output.stdout).unwrap();
- assert_eq!(actual, "43\n");
-}
-
-#[test]
-fn ts_dependency_recompilation() {
- let t = TempDir::new();
- let ats = t.path().join("a.ts");
-
- std::fs::write(
- &ats,
- "
- import { foo } from \"./b.ts\";
-
- function print(str: string): void {
- console.log(str);
- }
-
- print(foo);",
- )
- .unwrap();
-
- let bts = t.path().join("b.ts");
- std::fs::write(
- &bts,
- "
- export const foo = \"foo\";",
- )
- .unwrap();
-
- let output = util::deno_cmd()
- .current_dir(util::testdata_path())
- .env("NO_COLOR", "1")
- .arg("run")
- .arg("--check")
- .arg(&ats)
- .output()
- .expect("failed to spawn script");
-
- let stdout_output = std::str::from_utf8(&output.stdout).unwrap().trim();
- let stderr_output = std::str::from_utf8(&output.stderr).unwrap().trim();
-
- assert!(stdout_output.ends_with("foo"));
- assert!(stderr_output.starts_with("Check"));
-
- // Overwrite contents of b.ts and run again
- std::fs::write(
- &bts,
- "
- export const foo = 5;",
- )
- .expect("error writing file");
-
- let output = util::deno_cmd()
- .current_dir(util::testdata_path())
- .env("NO_COLOR", "1")
- .arg("run")
- .arg("--check")
- .arg(&ats)
- .output()
- .expect("failed to spawn script");
-
- let stdout_output = std::str::from_utf8(&output.stdout).unwrap().trim();
- let stderr_output = std::str::from_utf8(&output.stderr).unwrap().trim();
-
- // error: TS2345 [ERROR]: Argument of type '5' is not assignable to parameter of type 'string'.
- assert!(stderr_output.contains("TS2345"));
- assert!(!output.status.success());
- assert!(stdout_output.is_empty());
-}
-
-#[test]
-fn ts_no_recheck_on_redirect() {
- let deno_dir = util::new_deno_dir();
- let e = util::deno_exe_path();
-
- let redirect_ts = util::testdata_path().join("017_import_redirect.ts");
- assert!(redirect_ts.is_file());
- let mut cmd = Command::new(e.clone());
- cmd.env("DENO_DIR", deno_dir.path());
- let mut initial = cmd
- .current_dir(util::testdata_path())
- .arg("run")
- .arg("--check")
- .arg(redirect_ts.clone())
- .spawn()
- .expect("failed to span script");
- let status_initial =
- initial.wait().expect("failed to wait for child process");
- assert!(status_initial.success());
-
- let mut cmd = Command::new(e);
- cmd.env("DENO_DIR", deno_dir.path());
- let output = cmd
- .current_dir(util::testdata_path())
- .arg("run")
- .arg("--check")
- .arg(redirect_ts)
- .output()
- .expect("failed to spawn script");
-
- assert!(std::str::from_utf8(&output.stderr).unwrap().is_empty());
-}
-
-#[test]
-fn timeout_clear() {
- // https://github.com/denoland/deno/issues/7599
-
- use std::time::Duration;
- use std::time::Instant;
-
- let source_code = r#"
-const handle = setTimeout(() => {
- console.log("timeout finish");
-}, 10000);
-clearTimeout(handle);
-console.log("finish");
-"#;
-
- let mut p = util::deno_cmd()
- .current_dir(util::testdata_path())
- .arg("run")
- .arg("-")
- .stdin(std::process::Stdio::piped())
- .spawn()
- .unwrap();
- let stdin = p.stdin.as_mut().unwrap();
- stdin.write_all(source_code.as_bytes()).unwrap();
- let start = Instant::now();
- let status = p.wait().unwrap();
- let end = Instant::now();
- assert!(status.success());
- // check that program did not run for 10 seconds
- // for timeout to clear
- assert!(end - start < Duration::new(10, 0));
-}
-
-#[test]
-fn broken_stdout() {
- let (reader, writer) = os_pipe::pipe().unwrap();
- // drop the reader to create a broken pipe
- drop(reader);
-
- let output = util::deno_cmd()
- .current_dir(util::testdata_path())
- .arg("eval")
- .arg("console.log(3.14)")
- .stdout(writer)
- .stderr(std::process::Stdio::piped())
- .spawn()
- .unwrap()
- .wait_with_output()
- .unwrap();
-
- assert!(!output.status.success());
- let stderr = std::str::from_utf8(output.stderr.as_ref()).unwrap().trim();
- assert!(stderr.contains("Uncaught BrokenPipe"));
- assert!(!stderr.contains("panic"));
-}
-
-itest!(error_cause {
- args: "run error_cause.ts",
- output: "error_cause.ts.out",
- exit_code: 1,
-});
-
-itest!(error_cause_recursive {
- args: "run error_cause_recursive.ts",
- output: "error_cause_recursive.ts.out",
- exit_code: 1,
-});
-
-itest_flaky!(cafile_url_imports {
- args: "run --quiet --reload --cert tls/RootCA.pem cafile_url_imports.ts",
- output: "cafile_url_imports.ts.out",
- http_server: true,
-});
-
-itest_flaky!(cafile_ts_fetch {
- args:
- "run --quiet --reload --allow-net --cert tls/RootCA.pem cafile_ts_fetch.ts",
- output: "cafile_ts_fetch.ts.out",
- http_server: true,
-});
-
-itest_flaky!(cafile_eval {
- args: "eval --cert tls/RootCA.pem fetch('https://localhost:5545/cafile_ts_fetch.ts.out').then(r=>r.text()).then(t=>console.log(t.trimEnd()))",
- output: "cafile_ts_fetch.ts.out",
- http_server: true,
-});
-
-itest_flaky!(cafile_info {
- args:
- "info --quiet --cert tls/RootCA.pem https://localhost:5545/cafile_info.ts",
- output: "cafile_info.ts.out",
- http_server: true,
-});
-
-itest_flaky!(cafile_url_imports_unsafe_ssl {
- args: "run --quiet --reload --unsafely-ignore-certificate-errors=localhost cafile_url_imports.ts",
- output: "cafile_url_imports_unsafe_ssl.ts.out",
- http_server: true,
-});
-
-itest_flaky!(cafile_ts_fetch_unsafe_ssl {
- args:
- "run --quiet --reload --allow-net --unsafely-ignore-certificate-errors cafile_ts_fetch.ts",
- output: "cafile_ts_fetch_unsafe_ssl.ts.out",
- http_server: true,
-});
-
-itest!(deno_land_unsafe_ssl {
- args:
- "run --quiet --reload --allow-net --unsafely-ignore-certificate-errors=deno.land deno_land_unsafe_ssl.ts",
- output: "deno_land_unsafe_ssl.ts.out",
-});
-
-itest!(ip_address_unsafe_ssl {
- args:
- "run --quiet --reload --allow-net --unsafely-ignore-certificate-errors=1.1.1.1 ip_address_unsafe_ssl.ts",
- output: "ip_address_unsafe_ssl.ts.out",
-});
-
-itest!(localhost_unsafe_ssl {
- args:
- "run --quiet --reload --allow-net --unsafely-ignore-certificate-errors=deno.land cafile_url_imports.ts",
- output: "localhost_unsafe_ssl.ts.out",
- http_server: true,
- exit_code: 1,
-});
-
-#[flaky_test::flaky_test]
-fn cafile_env_fetch() {
- use deno_core::url::Url;
- let _g = util::http_server();
- let deno_dir = TempDir::new();
- let module_url =
- Url::parse("https://localhost:5545/cafile_url_imports.ts").unwrap();
- let cafile = util::testdata_path().join("tls/RootCA.pem");
- let output = Command::new(util::deno_exe_path())
- .env("DENO_DIR", deno_dir.path())
- .env("DENO_CERT", cafile)
- .current_dir(util::testdata_path())
- .arg("cache")
- .arg(module_url.to_string())
- .output()
- .expect("Failed to spawn script");
- assert!(output.status.success());
-}
-
-#[flaky_test::flaky_test]
-fn cafile_fetch() {
- use deno_core::url::Url;
- let _g = util::http_server();
- let deno_dir = TempDir::new();
- let module_url =
- Url::parse("http://localhost:4545/cafile_url_imports.ts").unwrap();
- let cafile = util::testdata_path().join("tls/RootCA.pem");
- let output = Command::new(util::deno_exe_path())
- .env("DENO_DIR", deno_dir.path())
- .current_dir(util::testdata_path())
- .arg("cache")
- .arg("--cert")
- .arg(cafile)
- .arg(module_url.to_string())
- .output()
- .expect("Failed to spawn script");
- assert!(output.status.success());
- let out = std::str::from_utf8(&output.stdout).unwrap();
- assert_eq!(out, "");
-}
-
-#[flaky_test::flaky_test]
-fn cafile_install_remote_module() {
- let _g = util::http_server();
- let temp_dir = TempDir::new();
- let bin_dir = temp_dir.path().join("bin");
- std::fs::create_dir(&bin_dir).unwrap();
- let deno_dir = TempDir::new();
- let cafile = util::testdata_path().join("tls/RootCA.pem");
-
- let install_output = Command::new(util::deno_exe_path())
- .env("DENO_DIR", deno_dir.path())
- .current_dir(util::testdata_path())
- .arg("install")
- .arg("--cert")
- .arg(cafile)
- .arg("--root")
- .arg(temp_dir.path())
- .arg("-n")
- .arg("echo_test")
- .arg("https://localhost:5545/echo.ts")
- .output()
- .expect("Failed to spawn script");
- println!("{}", std::str::from_utf8(&install_output.stdout).unwrap());
- eprintln!("{}", std::str::from_utf8(&install_output.stderr).unwrap());
- assert!(install_output.status.success());
-
- let mut echo_test_path = bin_dir.join("echo_test");
- if cfg!(windows) {
- echo_test_path = echo_test_path.with_extension("cmd");
- }
- assert!(echo_test_path.exists());
-
- let output = Command::new(echo_test_path)
- .current_dir(temp_dir.path())
- .arg("foo")
- .env("PATH", util::target_dir())
- .output()
- .expect("failed to spawn script");
- let stdout = std::str::from_utf8(&output.stdout).unwrap().trim();
- assert!(stdout.ends_with("foo"));
-}
-
-#[flaky_test::flaky_test]
-fn cafile_bundle_remote_exports() {
- let _g = util::http_server();
-
- // First we have to generate a bundle of some remote module that has exports.
- let mod1 = "https://localhost:5545/subdir/mod1.ts";
- let cafile = util::testdata_path().join("tls/RootCA.pem");
- let t = TempDir::new();
- let bundle = t.path().join("mod1.bundle.js");
- let mut deno = util::deno_cmd()
- .current_dir(util::testdata_path())
- .arg("bundle")
- .arg("--cert")
- .arg(cafile)
- .arg(mod1)
- .arg(&bundle)
- .spawn()
- .expect("failed to spawn script");
- let status = deno.wait().expect("failed to wait for the child process");
- assert!(status.success());
- assert!(bundle.is_file());
-
- // Now we try to use that bundle from another module.
- let test = t.path().join("test.js");
- std::fs::write(
- &test,
- "
- import { printHello3 } from \"./mod1.bundle.js\";
- printHello3(); ",
- )
- .expect("error writing file");
-
- let output = util::deno_cmd()
- .current_dir(util::testdata_path())
- .arg("run")
- .arg("--check")
- .arg(&test)
- .output()
- .expect("failed to spawn script");
- // check the output of the test.ts program.
- assert!(std::str::from_utf8(&output.stdout)
- .unwrap()
- .trim()
- .ends_with("Hello"));
- assert_eq!(output.stderr, b"");
-}
-
-#[test]
-fn websocket() {
- let _g = util::http_server();
-
- let script = util::testdata_path().join("websocket_test.ts");
- let root_ca = util::testdata_path().join("tls/RootCA.pem");
- let status = util::deno_cmd()
- .arg("test")
- .arg("--unstable")
- .arg("--allow-net")
- .arg("--cert")
- .arg(root_ca)
- .arg(script)
- .spawn()
- .unwrap()
- .wait()
- .unwrap();
-
- assert!(status.success());
-}
-
-#[test]
-fn websocketstream() {
- let _g = util::http_server();
-
- let script = util::testdata_path().join("websocketstream_test.ts");
- let root_ca = util::testdata_path().join("tls/RootCA.pem");
- let status = util::deno_cmd()
- .arg("test")
- .arg("--unstable")
- .arg("--allow-net")
- .arg("--cert")
- .arg(root_ca)
- .arg(script)
- .spawn()
- .unwrap()
- .wait()
- .unwrap();
-
- assert!(status.success());
-}
-
-#[test]
-fn websocketstream_ping() {
- use deno_runtime::deno_websocket::tokio_tungstenite::tungstenite;
- let _g = util::http_server();
-
- let script = util::testdata_path().join("websocketstream_ping_test.ts");
- let root_ca = util::testdata_path().join("tls/RootCA.pem");
- let mut child = util::deno_cmd()
- .arg("test")
- .arg("--unstable")
- .arg("--allow-net")
- .arg("--cert")
- .arg(root_ca)
- .arg(script)
- .stdout(std::process::Stdio::piped())
- .spawn()
- .unwrap();
-
- let server = std::net::TcpListener::bind("127.0.0.1:4513").unwrap();
- let (stream, _) = server.accept().unwrap();
- let mut socket = tungstenite::accept(stream).unwrap();
- socket
- .write_message(tungstenite::Message::Text(String::from("A")))
- .unwrap();
- socket
- .write_message(tungstenite::Message::Ping(vec![]))
- .unwrap();
- socket
- .write_message(tungstenite::Message::Text(String::from("B")))
- .unwrap();
- let message = socket.read_message().unwrap();
- assert_eq!(message, tungstenite::Message::Pong(vec![]));
- socket
- .write_message(tungstenite::Message::Text(String::from("C")))
- .unwrap();
- socket.close(None).unwrap();
-
- assert!(child.wait().unwrap().success());
-}
-
-#[test]
-fn websocket_server_multi_field_connection_header() {
- let script = util::testdata_path()
- .join("websocket_server_multi_field_connection_header_test.ts");
- let root_ca = util::testdata_path().join("tls/RootCA.pem");
- let mut child = util::deno_cmd()
- .arg("run")
- .arg("--unstable")
- .arg("--allow-net")
- .arg("--cert")
- .arg(root_ca)
- .arg(script)
- .stdout(std::process::Stdio::piped())
- .spawn()
- .unwrap();
-
- let stdout = child.stdout.as_mut().unwrap();
- let mut buffer = [0; 5];
- let read = stdout.read(&mut buffer).unwrap();
- assert_eq!(read, 5);
- let msg = std::str::from_utf8(&buffer).unwrap();
- assert_eq!(msg, "READY");
-
- let req = http::request::Builder::new()
- .header(http::header::CONNECTION, "keep-alive, Upgrade")
- .uri("ws://localhost:4319")
- .body(())
- .unwrap();
- let (mut socket, _) =
- deno_runtime::deno_websocket::tokio_tungstenite::tungstenite::connect(req)
- .unwrap();
- let message = socket.read_message().unwrap();
- assert_eq!(message, deno_runtime::deno_websocket::tokio_tungstenite::tungstenite::Message::Close(None));
- socket.close(None).unwrap();
- assert!(child.wait().unwrap().success());
-}
-
-// TODO(bartlomieju): this should use `deno run`, not `deno test`; but the
-// test hangs then. https://github.com/denoland/deno/issues/14283
-#[test]
-#[ignore]
-fn websocket_server_idletimeout() {
- let script = util::testdata_path().join("websocket_server_idletimeout.ts");
- let root_ca = util::testdata_path().join("tls/RootCA.pem");
- let mut child = util::deno_cmd()
- .arg("test")
- .arg("--unstable")
- .arg("--allow-net")
- .arg("--cert")
- .arg(root_ca)
- .arg(script)
- .stdout(std::process::Stdio::piped())
- .spawn()
- .unwrap();
-
- let stdout = child.stdout.as_mut().unwrap();
- let mut buffer = [0; 5];
- let read = stdout.read(&mut buffer).unwrap();
- assert_eq!(read, 5);
- let msg = std::str::from_utf8(&buffer).unwrap();
- assert_eq!(msg, "READY");
-
- let req = http::request::Builder::new()
- .uri("ws://localhost:4509")
- .body(())
- .unwrap();
- let (_ws, _request) =
- deno_runtime::deno_websocket::tokio_tungstenite::tungstenite::connect(req)
- .unwrap();
-
- assert!(child.wait().unwrap().success());
-}
-
-#[cfg(not(windows))]
-#[test]
-fn set_raw_should_not_panic_on_no_tty() {
- let output = util::deno_cmd()
- .arg("eval")
- .arg("--unstable")
- .arg("Deno.setRaw(Deno.stdin.rid, true)")
- // stdin set to piped so it certainly does not refer to TTY
- .stdin(std::process::Stdio::piped())
- // stderr is piped so we can capture output.
- .stderr(std::process::Stdio::piped())
- .spawn()
- .unwrap()
- .wait_with_output()
- .unwrap();
- assert!(!output.status.success());
- let stderr = std::str::from_utf8(&output.stderr).unwrap().trim();
- assert!(stderr.contains("BadResource"));
-}
-
-#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
-async fn test_resolve_dns() {
- use std::net::SocketAddr;
- use std::str::FromStr;
- use std::sync::Arc;
- use std::time::Duration;
- use tokio::net::TcpListener;
- use tokio::net::UdpSocket;
- use tokio::sync::oneshot;
- use trust_dns_server::authority::Catalog;
- use trust_dns_server::authority::ZoneType;
- use trust_dns_server::proto::rr::Name;
- use trust_dns_server::store::in_memory::InMemoryAuthority;
- use trust_dns_server::ServerFuture;
-
- const DNS_PORT: u16 = 4553;
-
- // Setup DNS server for testing
- async fn run_dns_server(tx: oneshot::Sender<()>) {
- let zone_file =
- fs::read_to_string(util::testdata_path().join("resolve_dns.zone.in"))
- .unwrap();
- let lexer = Lexer::new(&zone_file);
- let records = Parser::new().parse(
- lexer,
- Some(Name::from_str("example.com").unwrap()),
- None,
- );
- if records.is_err() {
- panic!("failed to parse: {:?}", records.err())
- }
- let (origin, records) = records.unwrap();
- let authority = Box::new(Arc::new(
- InMemoryAuthority::new(origin, records, ZoneType::Primary, false)
- .unwrap(),
- ));
- let mut catalog: Catalog = Catalog::new();
- catalog.upsert(Name::root().into(), authority);
-
- let mut server_fut = ServerFuture::new(catalog);
- let socket_addr = SocketAddr::from(([127, 0, 0, 1], DNS_PORT));
- let tcp_listener = TcpListener::bind(socket_addr).await.unwrap();
- let udp_socket = UdpSocket::bind(socket_addr).await.unwrap();
- server_fut.register_socket(udp_socket);
- server_fut.register_listener(tcp_listener, Duration::from_secs(2));
-
- // Notifies that the DNS server is ready
- tx.send(()).unwrap();
-
- server_fut.block_until_done().await.unwrap();
- }
-
- let (ready_tx, ready_rx) = oneshot::channel();
- let dns_server_fut = run_dns_server(ready_tx);
- let handle = tokio::spawn(dns_server_fut);
-
- // Waits for the DNS server to be ready
- ready_rx.await.unwrap();
-
- // Pass: `--allow-net`
- {
- let output = util::deno_cmd()
- .current_dir(util::testdata_path())
- .env("NO_COLOR", "1")
- .arg("run")
- .arg("--check")
- .arg("--allow-net")
- .arg("resolve_dns.ts")
- .stdout(std::process::Stdio::piped())
- .stderr(std::process::Stdio::piped())
- .spawn()
- .unwrap()
- .wait_with_output()
- .unwrap();
- let err = String::from_utf8_lossy(&output.stderr);
- let out = String::from_utf8_lossy(&output.stdout);
- println!("{}", err);
- assert!(output.status.success());
- assert!(err.starts_with("Check file"));
-
- let expected =
- std::fs::read_to_string(util::testdata_path().join("resolve_dns.ts.out"))
- .unwrap();
- assert_eq!(expected, out);
- }
-
- // Pass: `--allow-net=127.0.0.1:4553`
- {
- let output = util::deno_cmd()
- .current_dir(util::testdata_path())
- .env("NO_COLOR", "1")
- .arg("run")
- .arg("--check")
- .arg("--allow-net=127.0.0.1:4553")
- .arg("resolve_dns.ts")
- .stdout(std::process::Stdio::piped())
- .stderr(std::process::Stdio::piped())
- .spawn()
- .unwrap()
- .wait_with_output()
- .unwrap();
- let err = String::from_utf8_lossy(&output.stderr);
- let out = String::from_utf8_lossy(&output.stdout);
- assert!(output.status.success());
- assert!(err.starts_with("Check file"));
-
- let expected =
- std::fs::read_to_string(util::testdata_path().join("resolve_dns.ts.out"))
- .unwrap();
- assert_eq!(expected, out);
- }
-
- // Permission error: `--allow-net=deno.land`
- {
- let output = util::deno_cmd()
- .current_dir(util::testdata_path())
- .env("NO_COLOR", "1")
- .arg("run")
- .arg("--check")
- .arg("--allow-net=deno.land")
- .arg("resolve_dns.ts")
- .stdout(std::process::Stdio::piped())
- .stderr(std::process::Stdio::piped())
- .spawn()
- .unwrap()
- .wait_with_output()
- .unwrap();
- let err = String::from_utf8_lossy(&output.stderr);
- let out = String::from_utf8_lossy(&output.stdout);
- assert!(!output.status.success());
- assert!(err.starts_with("Check file"));
- assert!(err.contains(r#"error: Uncaught PermissionDenied: Requires net access to "127.0.0.1:4553""#));
- assert!(out.is_empty());
- }
-
- // Permission error: no permission specified
- {
- let output = util::deno_cmd()
- .current_dir(util::testdata_path())
- .env("NO_COLOR", "1")
- .arg("run")
- .arg("--check")
- .arg("resolve_dns.ts")
- .stdout(std::process::Stdio::piped())
- .stderr(std::process::Stdio::piped())
- .spawn()
- .unwrap()
- .wait_with_output()
- .unwrap();
- let err = String::from_utf8_lossy(&output.stderr);
- let out = String::from_utf8_lossy(&output.stdout);
- assert!(!output.status.success());
- assert!(err.starts_with("Check file"));
- assert!(err.contains(r#"error: Uncaught PermissionDenied: Requires net access to "127.0.0.1:4553""#));
- assert!(out.is_empty());
- }
-
- handle.abort();
-}
-
-#[test]
-fn typecheck_declarations_ns() {
- let output = util::deno_cmd()
- .arg("test")
- .arg("--doc")
- .arg(util::root_path().join("cli/dts/lib.deno.ns.d.ts"))
- .output()
- .unwrap();
- println!("stdout: {}", String::from_utf8(output.stdout).unwrap());
- println!("stderr: {}", String::from_utf8(output.stderr).unwrap());
- assert!(output.status.success());
-}
-
-#[test]
-fn typecheck_declarations_unstable() {
- let output = util::deno_cmd()
- .arg("test")
- .arg("--doc")
- .arg("--unstable")
- .arg(util::root_path().join("cli/dts/lib.deno.unstable.d.ts"))
- .output()
- .unwrap();
- println!("stdout: {}", String::from_utf8(output.stdout).unwrap());
- println!("stderr: {}", String::from_utf8(output.stderr).unwrap());
- assert!(output.status.success());
-}
-
-#[test]
-fn typecheck_core() {
- let deno_dir = TempDir::new();
- let test_file = deno_dir.path().join("test_deno_core_types.ts");
- std::fs::write(
- &test_file,
- format!(
- "import \"{}\";",
- deno_core::resolve_path(
- util::root_path()
- .join("core/lib.deno_core.d.ts")
- .to_str()
- .unwrap()
- )
- .unwrap()
- ),
- )
- .unwrap();
- let output = util::deno_cmd_with_deno_dir(&deno_dir)
- .arg("run")
- .arg(test_file.to_str().unwrap())
- .output()
- .unwrap();
- println!("stdout: {}", String::from_utf8(output.stdout).unwrap());
- println!("stderr: {}", String::from_utf8(output.stderr).unwrap());
- assert!(output.status.success());
-}
-
-#[test]
fn js_unit_tests_lint() {
let status = util::deno_cmd()
.arg("lint")
@@ -1047,211 +124,3 @@ fn js_unit_tests() {
assert_eq!(Some(0), status.code());
assert!(status.success());
}
-
-#[test]
-fn basic_auth_tokens() {
- let _g = util::http_server();
-
- let output = util::deno_cmd()
- .current_dir(util::root_path())
- .arg("run")
- .arg("http://127.0.0.1:4554/001_hello.js")
- .stdout(std::process::Stdio::piped())
- .stderr(std::process::Stdio::piped())
- .spawn()
- .unwrap()
- .wait_with_output()
- .unwrap();
-
- assert!(!output.status.success());
-
- let stdout_str = std::str::from_utf8(&output.stdout).unwrap().trim();
- assert!(stdout_str.is_empty());
-
- let stderr_str = std::str::from_utf8(&output.stderr).unwrap().trim();
- eprintln!("{}", stderr_str);
-
- assert!(stderr_str
- .contains("Module not found \"http://127.0.0.1:4554/001_hello.js\"."));
-
- let output = util::deno_cmd()
- .current_dir(util::root_path())
- .arg("run")
- .arg("http://127.0.0.1:4554/001_hello.js")
- .env("DENO_AUTH_TOKENS", "testuser123:testpassabc@127.0.0.1:4554")
- .stdout(std::process::Stdio::piped())
- .stderr(std::process::Stdio::piped())
- .spawn()
- .unwrap()
- .wait_with_output()
- .unwrap();
-
- let stderr_str = std::str::from_utf8(&output.stderr).unwrap().trim();
- eprintln!("{}", stderr_str);
-
- assert!(output.status.success());
-
- let stdout_str = std::str::from_utf8(&output.stdout).unwrap().trim();
- assert_eq!(util::strip_ansi_codes(stdout_str), "Hello World");
-}
-
-#[tokio::test]
-async fn listen_tls_alpn() {
- // TLS streams require the presence of an ambient local task set to gracefully
- // close dropped connections in the background.
- LocalSet::new()
- .run_until(async {
- let mut child = util::deno_cmd()
- .current_dir(util::testdata_path())
- .arg("run")
- .arg("--unstable")
- .arg("--quiet")
- .arg("--allow-net")
- .arg("--allow-read")
- .arg("./listen_tls_alpn.ts")
- .arg("4504")
- .stdout(std::process::Stdio::piped())
- .spawn()
- .unwrap();
- let stdout = child.stdout.as_mut().unwrap();
- let mut msg = [0; 5];
- let read = stdout.read(&mut msg).unwrap();
- assert_eq!(read, 5);
- assert_eq!(&msg, b"READY");
-
- let mut reader = &mut BufReader::new(Cursor::new(include_bytes!(
- "../testdata/tls/RootCA.crt"
- )));
- let certs = rustls_pemfile::certs(&mut reader).unwrap();
- let mut root_store = rustls::RootCertStore::empty();
- root_store.add_parsable_certificates(&certs);
- let mut cfg = rustls::ClientConfig::builder()
- .with_safe_defaults()
- .with_root_certificates(root_store)
- .with_no_client_auth();
- cfg.alpn_protocols.push(b"foobar".to_vec());
- let cfg = Arc::new(cfg);
-
- let hostname = rustls::ServerName::try_from("localhost").unwrap();
-
- let tcp_stream = tokio::net::TcpStream::connect("localhost:4504")
- .await
- .unwrap();
- let mut tls_stream =
- TlsStream::new_client_side(tcp_stream, cfg, hostname);
-
- tls_stream.handshake().await.unwrap();
-
- let (_, rustls_connection) = tls_stream.get_ref();
- let alpn = rustls_connection.alpn_protocol().unwrap();
- assert_eq!(alpn, b"foobar");
-
- let status = child.wait().unwrap();
- assert!(status.success());
- })
- .await;
-}
-
-#[tokio::test]
-async fn listen_tls_alpn_fail() {
- // TLS streams require the presence of an ambient local task set to gracefully
- // close dropped connections in the background.
- LocalSet::new()
- .run_until(async {
- let mut child = util::deno_cmd()
- .current_dir(util::testdata_path())
- .arg("run")
- .arg("--unstable")
- .arg("--quiet")
- .arg("--allow-net")
- .arg("--allow-read")
- .arg("./listen_tls_alpn_fail.ts")
- .arg("4505")
- .stdout(std::process::Stdio::piped())
- .spawn()
- .unwrap();
- let stdout = child.stdout.as_mut().unwrap();
- let mut msg = [0; 5];
- let read = stdout.read(&mut msg).unwrap();
- assert_eq!(read, 5);
- assert_eq!(&msg, b"READY");
-
- let mut reader = &mut BufReader::new(Cursor::new(include_bytes!(
- "../testdata/tls/RootCA.crt"
- )));
- let certs = rustls_pemfile::certs(&mut reader).unwrap();
- let mut root_store = rustls::RootCertStore::empty();
- root_store.add_parsable_certificates(&certs);
- let mut cfg = rustls::ClientConfig::builder()
- .with_safe_defaults()
- .with_root_certificates(root_store)
- .with_no_client_auth();
- cfg.alpn_protocols.push(b"boofar".to_vec());
- let cfg = Arc::new(cfg);
-
- let hostname = rustls::ServerName::try_from("localhost").unwrap();
-
- let tcp_stream = tokio::net::TcpStream::connect("localhost:4505")
- .await
- .unwrap();
- let mut tls_stream =
- TlsStream::new_client_side(tcp_stream, cfg, hostname);
-
- tls_stream.handshake().await.unwrap_err();
-
- let (_, rustls_connection) = tls_stream.get_ref();
- assert!(rustls_connection.alpn_protocol().is_none());
-
- let status = child.wait().unwrap();
- assert!(status.success());
- })
- .await;
-}
-
-#[tokio::test]
-async fn http2_request_url() {
- // TLS streams require the presence of an ambient local task set to gracefully
- // close dropped connections in the background.
- LocalSet::new()
- .run_until(async {
- let mut child = util::deno_cmd()
- .current_dir(util::testdata_path())
- .arg("run")
- .arg("--unstable")
- .arg("--quiet")
- .arg("--allow-net")
- .arg("--allow-read")
- .arg("./http2_request_url.ts")
- .arg("4506")
- .stdout(std::process::Stdio::piped())
- .spawn()
- .unwrap();
- let stdout = child.stdout.as_mut().unwrap();
- let mut buffer = [0; 5];
- let read = stdout.read(&mut buffer).unwrap();
- assert_eq!(read, 5);
- let msg = std::str::from_utf8(&buffer).unwrap();
- assert_eq!(msg, "READY");
-
- let cert = reqwest::Certificate::from_pem(include_bytes!(
- "../testdata/tls/RootCA.crt"
- ))
- .unwrap();
-
- let client = reqwest::Client::builder()
- .add_root_certificate(cert)
- .http2_prior_knowledge()
- .build()
- .unwrap();
-
- let res = client.get("http://127.0.0.1:4506").send().await.unwrap();
- assert_eq!(200, res.status());
-
- let body = res.text().await.unwrap();
- assert_eq!(body, "http://127.0.0.1:4506/");
-
- child.kill().unwrap();
- child.wait().unwrap();
- })
- .await;
-}
diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs
index cdeb36c9c..44c7ec08f 100644
--- a/cli/tests/integration/repl_tests.rs
+++ b/cli/tests/integration/repl_tests.rs
@@ -160,9 +160,9 @@ fn pty_complete_expression() {
fn pty_complete_imports() {
util::with_pty(&["repl"], |mut console| {
// single quotes
- console.write_line("import './001_hel\t'");
+ console.write_line("import './run/001_hel\t'");
// double quotes
- console.write_line("import { output } from \"./045_out\t\"");
+ console.write_line("import { output } from \"./run/045_out\t\"");
console.write_line("output('testing output');");
console.write_line("close();");
@@ -179,7 +179,7 @@ fn pty_complete_imports() {
// ensure when the directory changes that the suggestions come from the cwd
util::with_pty(&["repl"], |mut console| {
console.write_line("Deno.chdir('./subdir');");
- console.write_line("import '../001_hel\t'");
+ console.write_line("import '../run/001_hel\t'");
console.write_line("close();");
let output = console.read_all_output();
@@ -750,7 +750,7 @@ fn eval_flag_runtime_error() {
fn eval_file_flag_valid_input() {
let (out, err) = util::run_and_collect_output_with_args(
true,
- vec!["repl", "--eval-file=./001_hello.js"],
+ vec!["repl", "--eval-file=./run/001_hello.js"],
None,
None,
false,
@@ -789,7 +789,7 @@ fn eval_file_flag_http_input() {
fn eval_file_flag_multiple_files() {
let (out, err) = util::run_and_collect_output_with_args(
true,
- vec!["repl", "--eval-file=http://127.0.0.1:4545/import_type.ts,./tsc/d.ts,http://127.0.0.1:4545/type_definitions/foo.js"],
+ vec!["repl", "--eval-file=http://127.0.0.1:4545/repl/import_type.ts,./tsc/d.ts,http://127.0.0.1:4545/type_definitions/foo.js"],
Some(vec!["b.method1=v4", "b.method1()+foo.toUpperCase()"]),
None,
true,
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index d4dfbb32b..55dac8573 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -1,10 +1,16 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
use deno_core::url;
+use deno_runtime::deno_fetch::reqwest;
+use std::io::Read;
+use std::io::Write;
use std::process::Command;
use std::process::Stdio;
use test_util as util;
use test_util::TempDir;
+use tokio::task::LocalSet;
+use trust_dns_client::serialize::txt::Lexer;
+use trust_dns_client::serialize::txt::Parser;
use util::assert_contains;
itest!(stdout_write_all {
@@ -24,248 +30,251 @@ itest!(stdout_write_sync_async {
});
itest!(_001_hello {
- args: "run --reload 001_hello.js",
- output: "001_hello.js.out",
+ args: "run --reload run/001_hello.js",
+ output: "run/001_hello.js.out",
});
itest!(_002_hello {
- args: "run --quiet --reload 002_hello.ts",
- output: "002_hello.ts.out",
+ args: "run --quiet --reload run/002_hello.ts",
+ output: "run/002_hello.ts.out",
});
itest!(_003_relative_import {
- args: "run --quiet --reload 003_relative_import.ts",
- output: "003_relative_import.ts.out",
+ args: "run --quiet --reload run/003_relative_import.ts",
+ output: "run/003_relative_import.ts.out",
});
itest!(_004_set_timeout {
- args: "run --quiet --reload 004_set_timeout.ts",
- output: "004_set_timeout.ts.out",
+ args: "run --quiet --reload run/004_set_timeout.ts",
+ output: "run/004_set_timeout.ts.out",
});
itest!(_005_more_imports {
- args: "run --quiet --reload 005_more_imports.ts",
- output: "005_more_imports.ts.out",
+ args: "run --quiet --reload run/005_more_imports.ts",
+ output: "run/005_more_imports.ts.out",
});
itest!(_006_url_imports {
- args: "run --quiet --reload 006_url_imports.ts",
- output: "006_url_imports.ts.out",
+ args: "run --quiet --reload run/006_url_imports.ts",
+ output: "run/006_url_imports.ts.out",
http_server: true,
});
itest!(_012_async {
- args: "run --quiet --reload 012_async.ts",
- output: "012_async.ts.out",
+ args: "run --quiet --reload run/012_async.ts",
+ output: "run/012_async.ts.out",
});
itest!(_013_dynamic_import {
- args: "run --quiet --reload --allow-read 013_dynamic_import.ts",
- output: "013_dynamic_import.ts.out",
+ args: "run --quiet --reload --allow-read run/013_dynamic_import.ts",
+ output: "run/013_dynamic_import.ts.out",
});
itest!(_014_duplicate_import {
- args: "run --quiet --reload --allow-read 014_duplicate_import.ts ",
- output: "014_duplicate_import.ts.out",
+ args: "run --quiet --reload --allow-read run/014_duplicate_import.ts ",
+ output: "run/014_duplicate_import.ts.out",
});
itest!(_015_duplicate_parallel_import {
- args: "run --quiet --reload --allow-read 015_duplicate_parallel_import.js",
- output: "015_duplicate_parallel_import.js.out",
+ args:
+ "run --quiet --reload --allow-read run/015_duplicate_parallel_import.js",
+ output: "run/015_duplicate_parallel_import.js.out",
});
itest!(_016_double_await {
- args: "run --quiet --allow-read --reload 016_double_await.ts",
- output: "016_double_await.ts.out",
+ args: "run --quiet --allow-read --reload run/016_double_await.ts",
+ output: "run/016_double_await.ts.out",
});
itest!(_017_import_redirect {
- args: "run --quiet --reload 017_import_redirect.ts",
- output: "017_import_redirect.ts.out",
+ args: "run --quiet --reload run/017_import_redirect.ts",
+ output: "run/017_import_redirect.ts.out",
});
itest!(_017_import_redirect_nocheck {
- args: "run --quiet --reload --no-check 017_import_redirect.ts",
- output: "017_import_redirect.ts.out",
+ args: "run --quiet --reload --no-check run/017_import_redirect.ts",
+ output: "run/017_import_redirect.ts.out",
});
itest!(_017_import_redirect_info {
- args: "info --quiet --reload 017_import_redirect.ts",
- output: "017_import_redirect_info.out",
+ args: "info --quiet --reload run/017_import_redirect.ts",
+ output: "run/017_import_redirect_info.out",
});
itest!(_018_async_catch {
- args: "run --quiet --reload 018_async_catch.ts",
- output: "018_async_catch.ts.out",
+ args: "run --quiet --reload run/018_async_catch.ts",
+ output: "run/018_async_catch.ts.out",
});
itest!(_019_media_types {
- args: "run --reload 019_media_types.ts",
- output: "019_media_types.ts.out",
+ args: "run --reload run/019_media_types.ts",
+ output: "run/019_media_types.ts.out",
http_server: true,
});
itest!(_020_json_modules {
- args: "run --reload 020_json_modules.ts",
- output: "020_json_modules.ts.out",
+ args: "run --reload run/020_json_modules.ts",
+ output: "run/020_json_modules.ts.out",
exit_code: 1,
});
itest!(_021_mjs_modules {
- args: "run --quiet --reload 021_mjs_modules.ts",
- output: "021_mjs_modules.ts.out",
+ args: "run --quiet --reload run/021_mjs_modules.ts",
+ output: "run/021_mjs_modules.ts.out",
});
itest!(_023_no_ext {
- args: "run --reload --check 023_no_ext",
- output: "023_no_ext.out",
+ args: "run --reload --check run/023_no_ext",
+ output: "run/023_no_ext.out",
});
// TODO(lucacasonato): remove --unstable when permissions goes stable
itest!(_025_hrtime {
- args: "run --quiet --allow-hrtime --unstable --reload 025_hrtime.ts",
- output: "025_hrtime.ts.out",
+ args: "run --quiet --allow-hrtime --unstable --reload run/025_hrtime.ts",
+ output: "run/025_hrtime.ts.out",
});
itest!(_025_reload_js_type_error {
- args: "run --quiet --reload 025_reload_js_type_error.js",
- output: "025_reload_js_type_error.js.out",
+ args: "run --quiet --reload run/025_reload_js_type_error.js",
+ output: "run/025_reload_js_type_error.js.out",
});
itest!(_026_redirect_javascript {
- args: "run --quiet --reload 026_redirect_javascript.js",
- output: "026_redirect_javascript.js.out",
+ args: "run --quiet --reload run/026_redirect_javascript.js",
+ output: "run/026_redirect_javascript.js.out",
http_server: true,
});
itest!(_027_redirect_typescript {
- args: "run --quiet --reload 027_redirect_typescript.ts",
- output: "027_redirect_typescript.ts.out",
+ args: "run --quiet --reload run/027_redirect_typescript.ts",
+ output: "run/027_redirect_typescript.ts.out",
http_server: true,
});
itest!(_028_args {
- args: "run --quiet --reload 028_args.ts --arg1 val1 --arg2=val2 -- arg3 arg4",
- output: "028_args.ts.out",
+ args:
+ "run --quiet --reload run/028_args.ts --arg1 val1 --arg2=val2 -- arg3 arg4",
+ output: "run/028_args.ts.out",
});
itest!(_033_import_map {
args:
"run --quiet --reload --import-map=import_maps/import_map.json import_maps/test.ts",
- output: "033_import_map.out",
+ output: "run/033_import_map.out",
});
itest!(_033_import_map_remote {
args:
"run --quiet --reload --import-map=http://127.0.0.1:4545/import_maps/import_map_remote.json --unstable import_maps/test_remote.ts",
- output: "033_import_map_remote.out",
+ output: "run/033_import_map_remote.out",
http_server: true,
});
-itest!(_034_onload {
- args: "run --quiet --reload 034_onload/main.ts",
- output: "034_onload.out",
+itest!(onload {
+ args: "run --quiet --reload run/onload/main.ts",
+ output: "run/onload/main.out",
});
itest!(_035_cached_only_flag {
- args: "run --reload --check --cached-only http://127.0.0.1:4545/019_media_types.ts",
- output: "035_cached_only_flag.out",
+ args: "run --reload --check --cached-only http://127.0.0.1:4545/run/019_media_types.ts",
+ output: "run/035_cached_only_flag.out",
exit_code: 1,
http_server: true,
});
itest!(_038_checkjs {
// checking if JS file is run through TS compiler
- args: "run --reload --config checkjs.tsconfig.json --check 038_checkjs.js",
+ args:
+ "run --reload --config run/checkjs.tsconfig.json --check run/038_checkjs.js",
exit_code: 1,
- output: "038_checkjs.js.out",
+ output: "run/038_checkjs.js.out",
});
itest!(_042_dyn_import_evalcontext {
- args: "run --quiet --allow-read --reload 042_dyn_import_evalcontext.ts",
- output: "042_dyn_import_evalcontext.ts.out",
+ args: "run --quiet --allow-read --reload run/042_dyn_import_evalcontext.ts",
+ output: "run/042_dyn_import_evalcontext.ts.out",
});
itest!(_044_bad_resource {
- args: "run --quiet --reload --allow-read 044_bad_resource.ts",
- output: "044_bad_resource.ts.out",
+ args: "run --quiet --reload --allow-read run/044_bad_resource.ts",
+ output: "run/044_bad_resource.ts.out",
exit_code: 1,
});
// TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
itest!(_045_proxy {
- args: "run -L debug --unstable --allow-net --allow-env --allow-run --allow-read --reload --quiet 045_proxy_test.ts",
- output: "045_proxy_test.ts.out",
+ args: "run -L debug --unstable --allow-net --allow-env --allow-run --allow-read --reload --quiet run/045_proxy_test.ts",
+ output: "run/045_proxy_test.ts.out",
http_server: true,
});
itest!(_046_tsx {
- args: "run --quiet --reload 046_jsx_test.tsx",
- output: "046_jsx_test.tsx.out",
+ args: "run --quiet --reload run/046_jsx_test.tsx",
+ output: "run/046_jsx_test.tsx.out",
});
itest!(_047_jsx {
- args: "run --quiet --reload 047_jsx_test.jsx",
- output: "047_jsx_test.jsx.out",
+ args: "run --quiet --reload run/047_jsx_test.jsx",
+ output: "run/047_jsx_test.jsx.out",
});
itest!(_048_media_types_jsx {
- args: "run --reload 048_media_types_jsx.ts",
- output: "048_media_types_jsx.ts.out",
+ args: "run --reload run/048_media_types_jsx.ts",
+ output: "run/048_media_types_jsx.ts.out",
http_server: true,
});
itest!(_052_no_remote_flag {
args:
- "run --reload --check --no-remote http://127.0.0.1:4545/019_media_types.ts",
- output: "052_no_remote_flag.out",
+ "run --reload --check --no-remote http://127.0.0.1:4545/run/019_media_types.ts",
+ output: "run/052_no_remote_flag.out",
exit_code: 1,
http_server: true,
});
itest!(_056_make_temp_file_write_perm {
args:
- "run --quiet --allow-read --allow-write=./subdir/ 056_make_temp_file_write_perm.ts",
- output: "056_make_temp_file_write_perm.out",
+ "run --quiet --allow-read --allow-write=./subdir/ run/056_make_temp_file_write_perm.ts",
+ output: "run/056_make_temp_file_write_perm.out",
});
itest!(_058_tasks_microtasks_close {
- args: "run --quiet 058_tasks_microtasks_close.ts",
- output: "058_tasks_microtasks_close.ts.out",
+ args: "run --quiet run/058_tasks_microtasks_close.ts",
+ output: "run/058_tasks_microtasks_close.ts.out",
});
itest!(_059_fs_relative_path_perm {
- args: "run 059_fs_relative_path_perm.ts",
- output: "059_fs_relative_path_perm.ts.out",
+ args: "run run/059_fs_relative_path_perm.ts",
+ output: "run/059_fs_relative_path_perm.ts.out",
exit_code: 1,
});
itest!(_070_location {
- args: "run --location https://foo/bar?baz#bat 070_location.ts",
- output: "070_location.ts.out",
+ args: "run --location https://foo/bar?baz#bat run/070_location.ts",
+ output: "run/070_location.ts.out",
});
itest!(_071_location_unset {
- args: "run 071_location_unset.ts",
- output: "071_location_unset.ts.out",
+ args: "run run/071_location_unset.ts",
+ output: "run/071_location_unset.ts.out",
});
itest!(_072_location_relative_fetch {
- args: "run --location http://127.0.0.1:4545/ --allow-net 072_location_relative_fetch.ts",
- output: "072_location_relative_fetch.ts.out",
+ args: "run --location http://127.0.0.1:4545/ --allow-net run/072_location_relative_fetch.ts",
+ output: "run/072_location_relative_fetch.ts.out",
http_server: true,
});
-// tests the serialization of webstorage (both localStorage and sessionStorage)
-itest!(webstorage_serialization {
- args: "run webstorage/serialization.ts",
- output: "webstorage/serialization.ts.out",
-});
-
// tests the beforeunload event
itest!(beforeunload_event {
- args: "run before_unload.js",
- output: "before_unload.js.out",
+ args: "run run/before_unload.js",
+ output: "run/before_unload.js.out",
+});
+
+// tests the serialization of webstorage (both localStorage and sessionStorage)
+itest!(webstorage_serialization {
+ args: "run run/webstorage/serialization.ts",
+ output: "run/webstorage/serialization.ts.out",
});
// tests to ensure that when `--location` is set, all code shares the same
@@ -280,7 +289,7 @@ fn webstorage_location_shares_origin() {
.arg("run")
.arg("--location")
.arg("https://example.com/a.ts")
- .arg("webstorage/fixture.ts")
+ .arg("run/webstorage/fixture.ts")
.stdout(Stdio::piped())
.spawn()
.unwrap()
@@ -295,7 +304,7 @@ fn webstorage_location_shares_origin() {
.arg("run")
.arg("--location")
.arg("https://example.com/b.ts")
- .arg("webstorage/logger.ts")
+ .arg("run/webstorage/logger.ts")
.stdout(Stdio::piped())
.spawn()
.unwrap()
@@ -316,8 +325,8 @@ fn webstorage_config_file() {
.current_dir(util::testdata_path())
.arg("run")
.arg("--config")
- .arg("webstorage/config_a.jsonc")
- .arg("webstorage/fixture.ts")
+ .arg("run/webstorage/config_a.jsonc")
+ .arg("run/webstorage/fixture.ts")
.stdout(Stdio::piped())
.spawn()
.unwrap()
@@ -331,8 +340,8 @@ fn webstorage_config_file() {
.current_dir(util::testdata_path())
.arg("run")
.arg("--config")
- .arg("webstorage/config_b.jsonc")
- .arg("webstorage/logger.ts")
+ .arg("run/webstorage/config_b.jsonc")
+ .arg("run/webstorage/logger.ts")
.stdout(Stdio::piped())
.spawn()
.unwrap()
@@ -346,8 +355,8 @@ fn webstorage_config_file() {
.current_dir(util::testdata_path())
.arg("run")
.arg("--config")
- .arg("webstorage/config_a.jsonc")
- .arg("webstorage/logger.ts")
+ .arg("run/webstorage/config_a.jsonc")
+ .arg("run/webstorage/logger.ts")
.stdout(Stdio::piped())
.spawn()
.unwrap()
@@ -370,8 +379,8 @@ fn webstorage_location_precedes_config() {
.arg("--location")
.arg("https://example.com/a.ts")
.arg("--config")
- .arg("webstorage/config_a.jsonc")
- .arg("webstorage/fixture.ts")
+ .arg("run/webstorage/config_a.jsonc")
+ .arg("run/webstorage/fixture.ts")
.stdout(Stdio::piped())
.spawn()
.unwrap()
@@ -387,8 +396,8 @@ fn webstorage_location_precedes_config() {
.arg("--location")
.arg("https://example.com/b.ts")
.arg("--config")
- .arg("webstorage/config_b.jsonc")
- .arg("webstorage/logger.ts")
+ .arg("run/webstorage/config_b.jsonc")
+ .arg("run/webstorage/logger.ts")
.stdout(Stdio::piped())
.spawn()
.unwrap()
@@ -408,7 +417,7 @@ fn webstorage_main_module() {
let output = deno_cmd
.current_dir(util::testdata_path())
.arg("run")
- .arg("webstorage/fixture.ts")
+ .arg("run/webstorage/fixture.ts")
.stdout(Stdio::piped())
.spawn()
.unwrap()
@@ -421,7 +430,7 @@ fn webstorage_main_module() {
let output = deno_cmd
.current_dir(util::testdata_path())
.arg("run")
- .arg("webstorage/logger.ts")
+ .arg("run/webstorage/logger.ts")
.stdout(Stdio::piped())
.spawn()
.unwrap()
@@ -434,7 +443,7 @@ fn webstorage_main_module() {
let output = deno_cmd
.current_dir(util::testdata_path())
.arg("run")
- .arg("webstorage/fixture.ts")
+ .arg("run/webstorage/fixture.ts")
.stdout(Stdio::piped())
.spawn()
.unwrap()
@@ -445,36 +454,37 @@ fn webstorage_main_module() {
}
itest!(_075_import_local_query_hash {
- args: "run 075_import_local_query_hash.ts",
- output: "075_import_local_query_hash.ts.out",
+ args: "run run/075_import_local_query_hash.ts",
+ output: "run/075_import_local_query_hash.ts.out",
});
itest!(_077_fetch_empty {
- args: "run -A 077_fetch_empty.ts",
- output: "077_fetch_empty.ts.out",
+ args: "run -A run/077_fetch_empty.ts",
+ output: "run/077_fetch_empty.ts.out",
exit_code: 1,
});
itest!(_078_unload_on_exit {
- args: "run 078_unload_on_exit.ts",
- output: "078_unload_on_exit.ts.out",
+ args: "run run/078_unload_on_exit.ts",
+ output: "run/078_unload_on_exit.ts.out",
exit_code: 1,
});
itest!(_079_location_authentication {
- args: "run --location https://foo:bar@baz/qux 079_location_authentication.ts",
- output: "079_location_authentication.ts.out",
+ args:
+ "run --location https://foo:bar@baz/qux run/079_location_authentication.ts",
+ output: "run/079_location_authentication.ts.out",
});
itest!(_081_location_relative_fetch_redirect {
- args: "run --location http://127.0.0.1:4546/ --allow-net 081_location_relative_fetch_redirect.ts",
- output: "081_location_relative_fetch_redirect.ts.out",
+ args: "run --location http://127.0.0.1:4546/ --allow-net run/081_location_relative_fetch_redirect.ts",
+ output: "run/081_location_relative_fetch_redirect.ts.out",
http_server: true,
});
itest!(_082_prepare_stack_trace_throw {
- args: "run 082_prepare_stack_trace_throw.js",
- output: "082_prepare_stack_trace_throw.js.out",
+ args: "run run/082_prepare_stack_trace_throw.js",
+ output: "run/082_prepare_stack_trace_throw.js.out",
exit_code: 1,
});
@@ -482,9 +492,10 @@ itest!(_082_prepare_stack_trace_throw {
fn _083_legacy_external_source_map() {
let _g = util::http_server();
let deno_dir = TempDir::new();
- let module_url =
- url::Url::parse("http://localhost:4545/083_legacy_external_source_map.ts")
- .unwrap();
+ let module_url = url::Url::parse(
+ "http://localhost:4545/run/083_legacy_external_source_map.ts",
+ )
+ .unwrap();
// Write a faulty old external source map.
let faulty_map_path = deno_dir.path().join("gen/http/localhost_PORT4545/9576bd5febd0587c5c4d88d57cb3ac8ebf2600c529142abe3baa9a751d20c334.js.map");
std::fs::create_dir_all(faulty_map_path.parent().unwrap()).unwrap();
@@ -505,35 +516,35 @@ fn _083_legacy_external_source_map() {
assert_eq!(out, "");
}
-itest!(_085_dynamic_import_async_error {
- args: "run --allow-read 085_dynamic_import_async_error.ts",
- output: "085_dynamic_import_async_error.ts.out",
+itest!(dynamic_import_async_error {
+ args: "run --allow-read run/dynamic_import_async_error/main.ts",
+ output: "run/dynamic_import_async_error/main.out",
});
-itest!(_086_dynamic_import_already_rejected {
- args: "run --allow-read 086_dynamic_import_already_rejected.ts",
- output: "086_dynamic_import_already_rejected.ts.out",
+itest!(dynamic_import_already_rejected {
+ args: "run --allow-read run/dynamic_import_already_rejected/main.ts",
+ output: "run/dynamic_import_already_rejected/main.out",
});
-itest!(_087_no_check_imports_not_used_as_values {
- args: "run --config preserve_imports.tsconfig.json --no-check 087_no_check_imports_not_used_as_values.ts",
- output: "087_no_check_imports_not_used_as_values.ts.out",
+itest!(no_check_imports_not_used_as_values {
+ args: "run --config run/no_check_imports_not_used_as_values/preserve_imports.tsconfig.json --no-check run/no_check_imports_not_used_as_values/main.ts",
+ output: "run/no_check_imports_not_used_as_values/main.out",
});
itest!(_088_dynamic_import_already_evaluating {
- args: "run --allow-read 088_dynamic_import_already_evaluating.ts",
- output: "088_dynamic_import_already_evaluating.ts.out",
+ args: "run --allow-read run/088_dynamic_import_already_evaluating.ts",
+ output: "run/088_dynamic_import_already_evaluating.ts.out",
});
// TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
itest!(_089_run_allow_list {
- args: "run --unstable --allow-run=curl 089_run_allow_list.ts",
- output: "089_run_allow_list.ts.out",
+ args: "run --unstable --allow-run=curl run/089_run_allow_list.ts",
+ output: "run/089_run_allow_list.ts.out",
});
#[test]
fn _090_run_permissions_request() {
- let args = "run --quiet 090_run_permissions_request.ts";
+ let args = "run --quiet run/090_run_permissions_request.ts";
use util::PtyData::*;
util::test_pty2(args, vec![
Output("⚠️ ️Deno requests run access to \"ls\". Run again with --allow-run to bypass this prompt.\r\n Allow? [y/n (y = yes allow, n = no deny)]"),
@@ -547,159 +558,161 @@ fn _090_run_permissions_request() {
}
itest!(_091_use_define_for_class_fields {
- args: "run --check 091_use_define_for_class_fields.ts",
- output: "091_use_define_for_class_fields.ts.out",
+ args: "run --check run/091_use_define_for_class_fields.ts",
+ output: "run/091_use_define_for_class_fields.ts.out",
exit_code: 1,
});
itest!(_092_import_map_unmapped_bare_specifier {
- args: "run --import-map import_maps/import_map.json 092_import_map_unmapped_bare_specifier.ts",
- output: "092_import_map_unmapped_bare_specifier.ts.out",
+ args: "run --import-map import_maps/import_map.json run/092_import_map_unmapped_bare_specifier.ts",
+ output: "run/092_import_map_unmapped_bare_specifier.ts.out",
exit_code: 1,
});
itest!(js_import_detect {
- args: "run --quiet --reload js_import_detect.ts",
- output: "js_import_detect.ts.out",
+ args: "run --quiet --reload run/js_import_detect.ts",
+ output: "run/js_import_detect.ts.out",
exit_code: 0,
});
itest!(blob_gc_finalization {
- args: "run blob_gc_finalization.js",
- output: "blob_gc_finalization.js.out",
+ args: "run run/blob_gc_finalization.js",
+ output: "run/blob_gc_finalization.js.out",
exit_code: 0,
});
itest!(fetch_response_finalization {
- args: "run --v8-flags=--expose-gc --allow-net fetch_response_finalization.js",
- output: "fetch_response_finalization.js.out",
+ args:
+ "run --v8-flags=--expose-gc --allow-net run/fetch_response_finalization.js",
+ output: "run/fetch_response_finalization.js.out",
http_server: true,
exit_code: 0,
});
itest!(import_type {
- args: "run --reload import_type.ts",
- output: "import_type.ts.out",
+ args: "run --reload run/import_type.ts",
+ output: "run/import_type.ts.out",
});
itest!(import_type_no_check {
- args: "run --reload --no-check import_type.ts",
- output: "import_type.ts.out",
+ args: "run --reload --no-check run/import_type.ts",
+ output: "run/import_type.ts.out",
});
itest!(private_field_presence {
- args: "run --reload private_field_presence.ts",
- output: "private_field_presence.ts.out",
+ args: "run --reload run/private_field_presence.ts",
+ output: "run/private_field_presence.ts.out",
});
itest!(private_field_presence_no_check {
- args: "run --reload --no-check private_field_presence.ts",
- output: "private_field_presence.ts.out",
+ args: "run --reload --no-check run/private_field_presence.ts",
+ output: "run/private_field_presence.ts.out",
});
itest!(lock_write_requires_lock {
args: "run --lock-write some_file.ts",
- output: "lock_write_requires_lock.out",
+ output: "run/lock_write_requires_lock.out",
exit_code: 1,
});
// TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
itest!(lock_write_fetch {
args:
- "run --quiet --allow-read --allow-write --allow-env --allow-run --unstable lock_write_fetch.ts",
- output: "lock_write_fetch.ts.out",
+ "run --quiet --allow-read --allow-write --allow-env --allow-run --unstable run/lock_write_fetch/main.ts",
+ output: "run/lock_write_fetch/main.out",
http_server: true,
exit_code: 0,
});
itest!(lock_check_ok {
args:
- "run --lock=lock_check_ok.json http://127.0.0.1:4545/003_relative_import.ts",
- output: "003_relative_import.ts.out",
+ "run --lock=run/lock_check_ok.json http://127.0.0.1:4545/run/003_relative_import.ts",
+ output: "run/003_relative_import.ts.out",
http_server: true,
});
itest!(lock_check_ok2 {
- args: "run --lock=lock_check_ok2.json 019_media_types.ts",
- output: "019_media_types.ts.out",
+ args: "run --lock=run/lock_check_ok2.json run/019_media_types.ts",
+ output: "run/019_media_types.ts.out",
http_server: true,
});
itest!(lock_dynamic_imports {
- args: "run --lock=lock_dynamic_imports.json --allow-read --allow-net http://127.0.0.1:4545/013_dynamic_import.ts",
- output: "lock_dynamic_imports.out",
+ args: "run --lock=run/lock_dynamic_imports.json --allow-read --allow-net http://127.0.0.1:4545/run/013_dynamic_import.ts",
+ output: "run/lock_dynamic_imports.out",
exit_code: 10,
http_server: true,
});
itest!(lock_check_err {
- args: "run --lock=lock_check_err.json http://127.0.0.1:4545/003_relative_import.ts",
- output: "lock_check_err.out",
+ args: "run --lock=run/lock_check_err.json http://127.0.0.1:4545/run/003_relative_import.ts",
+ output: "run/lock_check_err.out",
exit_code: 10,
http_server: true,
});
itest!(lock_check_err2 {
- args: "run --lock=lock_check_err2.json 019_media_types.ts",
- output: "lock_check_err2.out",
+ args: "run --lock=run/lock_check_err2.json run/019_media_types.ts",
+ output: "run/lock_check_err2.out",
exit_code: 10,
http_server: true,
});
itest!(mts_dmts_mjs {
args: "run subdir/import.mts",
- output: "mts_dmts_mjs.out",
+ output: "run/mts_dmts_mjs.out",
});
itest!(mts_dmts_mjs_no_check {
args: "run --no-check subdir/import.mts",
- output: "mts_dmts_mjs.out",
+ output: "run/mts_dmts_mjs.out",
});
itest!(async_error {
exit_code: 1,
- args: "run --reload async_error.ts",
- output: "async_error.ts.out",
+ args: "run --reload run/async_error.ts",
+ output: "run/async_error.ts.out",
});
itest!(config {
- args: "run --reload --config config.tsconfig.json --check config.ts",
- output: "config.ts.out",
+ args:
+ "run --reload --config run/config/tsconfig.json --check run/config/main.ts",
+ output: "run/config/main.out",
});
itest!(config_types {
args:
- "run --reload --quiet --config config_types.tsconfig.json config_types.ts",
- output: "config_types.ts.out",
+ "run --reload --quiet --config run/config_types/tsconfig.json run/config_types/main.ts",
+ output: "run/config_types/main.out",
});
itest!(config_types_remote {
http_server: true,
- args: "run --reload --quiet --config config_types_remote.tsconfig.json config_types.ts",
- output: "config_types.ts.out",
+ args: "run --reload --quiet --config run/config_types/remote.tsconfig.json run/config_types/main.ts",
+ output: "run/config_types/main.out",
});
itest!(empty_typescript {
- args: "run --reload --check subdir/empty.ts",
- output_str: Some("Check file:[WILDCARD]/subdir/empty.ts\n"),
+ args: "run --reload --check run/empty.ts",
+ output_str: Some("Check file:[WILDCARD]/run/empty.ts\n"),
});
itest!(error_001 {
- args: "run --reload error_001.ts",
+ args: "run --reload run/error_001.ts",
exit_code: 1,
- output: "error_001.ts.out",
+ output: "run/error_001.ts.out",
});
itest!(error_002 {
- args: "run --reload error_002.ts",
+ args: "run --reload run/error_002.ts",
exit_code: 1,
- output: "error_002.ts.out",
+ output: "run/error_002.ts.out",
});
itest!(error_003_typescript {
- args: "run --reload --check error_003_typescript.ts",
+ args: "run --reload --check run/error_003_typescript.ts",
exit_code: 1,
- output: "error_003_typescript.ts.out",
+ output: "run/error_003_typescript.ts.out",
});
// Supposing that we've already attempted to run error_003_typescript.ts
@@ -707,820 +720,816 @@ itest!(error_003_typescript {
// should result in the same output.
// https://github.com/denoland/deno/issues/2436
itest!(error_003_typescript2 {
- args: "run --check error_003_typescript.ts",
+ args: "run --check run/error_003_typescript.ts",
exit_code: 1,
- output: "error_003_typescript.ts.out",
+ output: "run/error_003_typescript.ts.out",
});
itest!(error_004_missing_module {
- args: "run --reload error_004_missing_module.ts",
+ args: "run --reload run/error_004_missing_module.ts",
exit_code: 1,
- output: "error_004_missing_module.ts.out",
+ output: "run/error_004_missing_module.ts.out",
});
itest!(error_005_missing_dynamic_import {
- args: "run --reload --allow-read --quiet error_005_missing_dynamic_import.ts",
+ args:
+ "run --reload --allow-read --quiet run/error_005_missing_dynamic_import.ts",
exit_code: 1,
- output: "error_005_missing_dynamic_import.ts.out",
+ output: "run/error_005_missing_dynamic_import.ts.out",
});
itest!(error_006_import_ext_failure {
- args: "run --reload error_006_import_ext_failure.ts",
+ args: "run --reload run/error_006_import_ext_failure.ts",
exit_code: 1,
- output: "error_006_import_ext_failure.ts.out",
+ output: "run/error_006_import_ext_failure.ts.out",
});
itest!(error_007_any {
- args: "run --reload error_007_any.ts",
+ args: "run --reload run/error_007_any.ts",
exit_code: 1,
- output: "error_007_any.ts.out",
+ output: "run/error_007_any.ts.out",
});
itest!(error_008_checkjs {
- args: "run --reload error_008_checkjs.js",
+ args: "run --reload run/error_008_checkjs.js",
exit_code: 1,
- output: "error_008_checkjs.js.out",
+ output: "run/error_008_checkjs.js.out",
});
itest!(error_009_extensions_error {
- args: "run error_009_extensions_error.js",
- output: "error_009_extensions_error.js.out",
+ args: "run run/error_009_extensions_error.js",
+ output: "run/error_009_extensions_error.js.out",
exit_code: 1,
});
itest!(error_011_bad_module_specifier {
- args: "run --reload error_011_bad_module_specifier.ts",
+ args: "run --reload run/error_011_bad_module_specifier.ts",
exit_code: 1,
- output: "error_011_bad_module_specifier.ts.out",
+ output: "run/error_011_bad_module_specifier.ts.out",
});
itest!(error_012_bad_dynamic_import_specifier {
- args: "run --reload --check error_012_bad_dynamic_import_specifier.ts",
+ args: "run --reload --check run/error_012_bad_dynamic_import_specifier.ts",
exit_code: 1,
- output: "error_012_bad_dynamic_import_specifier.ts.out",
+ output: "run/error_012_bad_dynamic_import_specifier.ts.out",
});
itest!(error_013_missing_script {
args: "run --reload missing_file_name",
exit_code: 1,
- output: "error_013_missing_script.out",
+ output: "run/error_013_missing_script.out",
});
itest!(error_014_catch_dynamic_import_error {
- args: "run --reload --allow-read error_014_catch_dynamic_import_error.js",
- output: "error_014_catch_dynamic_import_error.js.out",
+ args:
+ "run --reload --allow-read run/error_014_catch_dynamic_import_error.js",
+ output: "run/error_014_catch_dynamic_import_error.js.out",
});
itest!(error_015_dynamic_import_permissions {
- args: "run --reload --quiet error_015_dynamic_import_permissions.js",
- output: "error_015_dynamic_import_permissions.out",
+ args: "run --reload --quiet run/error_015_dynamic_import_permissions.js",
+ output: "run/error_015_dynamic_import_permissions.out",
exit_code: 1,
http_server: true,
});
// We have an allow-net flag but not allow-read, it should still result in error.
itest!(error_016_dynamic_import_permissions2 {
- args: "run --reload --allow-net error_016_dynamic_import_permissions2.js",
- output: "error_016_dynamic_import_permissions2.out",
+ args: "run --reload --allow-net run/error_016_dynamic_import_permissions2.js",
+ output: "run/error_016_dynamic_import_permissions2.out",
exit_code: 1,
http_server: true,
});
itest!(error_017_hide_long_source_ts {
- args: "run --reload --check error_017_hide_long_source_ts.ts",
- output: "error_017_hide_long_source_ts.ts.out",
+ args: "run --reload --check run/error_017_hide_long_source_ts.ts",
+ output: "run/error_017_hide_long_source_ts.ts.out",
exit_code: 1,
});
itest!(error_018_hide_long_source_js {
- args: "run error_018_hide_long_source_js.js",
- output: "error_018_hide_long_source_js.js.out",
+ args: "run run/error_018_hide_long_source_js.js",
+ output: "run/error_018_hide_long_source_js.js.out",
exit_code: 1,
});
itest!(error_019_stack_function {
- args: "run error_019_stack_function.ts",
- output: "error_019_stack_function.ts.out",
+ args: "run run/error_019_stack_function.ts",
+ output: "run/error_019_stack_function.ts.out",
exit_code: 1,
});
itest!(error_020_stack_constructor {
- args: "run error_020_stack_constructor.ts",
- output: "error_020_stack_constructor.ts.out",
+ args: "run run/error_020_stack_constructor.ts",
+ output: "run/error_020_stack_constructor.ts.out",
exit_code: 1,
});
itest!(error_021_stack_method {
- args: "run error_021_stack_method.ts",
- output: "error_021_stack_method.ts.out",
+ args: "run run/error_021_stack_method.ts",
+ output: "run/error_021_stack_method.ts.out",
exit_code: 1,
});
itest!(error_022_stack_custom_error {
- args: "run error_022_stack_custom_error.ts",
- output: "error_022_stack_custom_error.ts.out",
+ args: "run run/error_022_stack_custom_error.ts",
+ output: "run/error_022_stack_custom_error.ts.out",
exit_code: 1,
});
itest!(error_023_stack_async {
- args: "run error_023_stack_async.ts",
- output: "error_023_stack_async.ts.out",
+ args: "run run/error_023_stack_async.ts",
+ output: "run/error_023_stack_async.ts.out",
exit_code: 1,
});
itest!(error_024_stack_promise_all {
- args: "run error_024_stack_promise_all.ts",
- output: "error_024_stack_promise_all.ts.out",
+ args: "run run/error_024_stack_promise_all.ts",
+ output: "run/error_024_stack_promise_all.ts.out",
exit_code: 1,
});
itest!(error_025_tab_indent {
- args: "run error_025_tab_indent",
- output: "error_025_tab_indent.out",
+ args: "run run/error_025_tab_indent",
+ output: "run/error_025_tab_indent.out",
exit_code: 1,
});
itest!(error_026_remote_import_error {
- args: "run error_026_remote_import_error.ts",
- output: "error_026_remote_import_error.ts.out",
+ args: "run run/error_026_remote_import_error.ts",
+ output: "run/error_026_remote_import_error.ts.out",
exit_code: 1,
http_server: true,
});
itest!(error_for_await {
- args: "run --reload --check error_for_await.ts",
- output: "error_for_await.ts.out",
+ args: "run --reload --check run/error_for_await.ts",
+ output: "run/error_for_await.ts.out",
exit_code: 1,
});
itest!(error_missing_module_named_import {
- args: "run --reload error_missing_module_named_import.ts",
- output: "error_missing_module_named_import.ts.out",
+ args: "run --reload run/error_missing_module_named_import.ts",
+ output: "run/error_missing_module_named_import.ts.out",
exit_code: 1,
});
itest!(error_no_check {
- args: "run --reload --no-check error_no_check.ts",
- output: "error_no_check.ts.out",
+ args: "run --reload --no-check run/error_no_check.ts",
+ output: "run/error_no_check.ts.out",
exit_code: 1,
});
itest!(error_syntax {
- args: "run --reload error_syntax.js",
+ args: "run --reload run/error_syntax.js",
exit_code: 1,
- output: "error_syntax.js.out",
+ output: "run/error_syntax.js.out",
});
itest!(error_syntax_empty_trailing_line {
- args: "run --reload error_syntax_empty_trailing_line.mjs",
+ args: "run --reload run/error_syntax_empty_trailing_line.mjs",
exit_code: 1,
- output: "error_syntax_empty_trailing_line.mjs.out",
+ output: "run/error_syntax_empty_trailing_line.mjs.out",
});
itest!(error_type_definitions {
- args: "run --reload --check error_type_definitions.ts",
+ args: "run --reload --check run/error_type_definitions.ts",
exit_code: 1,
- output: "error_type_definitions.ts.out",
+ output: "run/error_type_definitions.ts.out",
});
itest!(error_local_static_import_from_remote_ts {
- args: "run --reload http://localhost:4545/error_local_static_import_from_remote.ts",
+ args: "run --reload http://localhost:4545/run/error_local_static_import_from_remote.ts",
exit_code: 1,
http_server: true,
- output: "error_local_static_import_from_remote.ts.out",
+ output: "run/error_local_static_import_from_remote.ts.out",
});
itest!(error_local_static_import_from_remote_js {
- args: "run --reload http://localhost:4545/error_local_static_import_from_remote.js",
+ args: "run --reload http://localhost:4545/run/error_local_static_import_from_remote.js",
exit_code: 1,
http_server: true,
- output: "error_local_static_import_from_remote.js.out",
+ output: "run/error_local_static_import_from_remote.js.out",
});
itest!(exit_error42 {
exit_code: 42,
- args: "run --quiet --reload exit_error42.ts",
- output: "exit_error42.ts.out",
+ args: "run --quiet --reload run/exit_error42.ts",
+ output: "run/exit_error42.ts.out",
});
itest!(set_exit_code_0 {
- args: "run --no-check --unstable set_exit_code_0.ts",
- output: "empty.out",
+ args: "run --no-check --unstable run/set_exit_code_0.ts",
+ output_str: Some(""),
exit_code: 0,
});
itest!(set_exit_code_1 {
- args: "run --no-check --unstable set_exit_code_1.ts",
- output: "empty.out",
+ args: "run --no-check --unstable run/set_exit_code_1.ts",
+ output_str: Some(""),
exit_code: 42,
});
itest!(set_exit_code_2 {
- args: "run --no-check --unstable set_exit_code_2.ts",
- output: "empty.out",
+ args: "run --no-check --unstable run/set_exit_code_2.ts",
+ output_str: Some(""),
exit_code: 42,
});
itest!(op_exit_op_set_exit_code_in_worker {
- args: "run --no-check --unstable --allow-read op_exit_op_set_exit_code_in_worker.ts",
+ args: "run --no-check --unstable --allow-read run/op_exit_op_set_exit_code_in_worker.ts",
exit_code: 21,
- output: "empty.out",
+ output_str: Some(""),
});
itest!(deno_exit_tampering {
- args: "run --no-check --unstable deno_exit_tampering.ts",
- output: "empty.out",
+ args: "run --no-check --unstable run/deno_exit_tampering.ts",
+ output_str: Some(""),
exit_code: 42,
});
itest!(heapstats {
- args: "run --quiet --unstable --v8-flags=--expose-gc heapstats.js",
- output: "heapstats.js.out",
+ args: "run --quiet --unstable --v8-flags=--expose-gc run/heapstats.js",
+ output: "run/heapstats.js.out",
});
itest!(finalization_registry {
args:
- "run --quiet --unstable --v8-flags=--expose-gc finalization_registry.js",
- output: "finalization_registry.js.out",
+ "run --quiet --unstable --v8-flags=--expose-gc run/finalization_registry.js",
+ output: "run/finalization_registry.js.out",
});
itest!(https_import {
- args: "run --quiet --reload --cert tls/RootCA.pem https_import.ts",
- output: "https_import.ts.out",
+ args: "run --quiet --reload --cert tls/RootCA.pem run/https_import.ts",
+ output: "run/https_import.ts.out",
http_server: true,
});
itest!(if_main {
- args: "run --quiet --reload if_main.ts",
- output: "if_main.ts.out",
+ args: "run --quiet --reload run/if_main.ts",
+ output: "run/if_main.ts.out",
});
itest!(import_meta {
- args: "run --quiet --reload --import-map=import_meta.importmap.json import_meta.ts",
- output: "import_meta.ts.out",
+ args: "run --quiet --reload --import-map=run/import_meta/importmap.json run/import_meta/main.ts",
+ output: "run/import_meta/main.out",
});
itest!(main_module {
- args: "run --quiet --allow-read --reload main_module.ts",
- output: "main_module.ts.out",
+ args: "run --quiet --allow-read --reload run/main_module/main.ts",
+ output: "run/main_module/main.out",
});
itest!(no_check {
- args: "run --quiet --reload --no-check 006_url_imports.ts",
- output: "006_url_imports.ts.out",
+ args: "run --quiet --reload --no-check run/006_url_imports.ts",
+ output: "run/006_url_imports.ts.out",
http_server: true,
});
itest!(no_check_decorators {
- args: "run --quiet --reload --no-check no_check_decorators.ts",
- output: "no_check_decorators.ts.out",
+ args: "run --quiet --reload --no-check run/no_check_decorators.ts",
+ output: "run/no_check_decorators.ts.out",
});
itest!(check_remote {
- args: "run --quiet --reload --check=all no_check_remote.ts",
- output: "no_check_remote.ts.disabled.out",
+ args: "run --quiet --reload --check=all run/no_check_remote.ts",
+ output: "run/no_check_remote.ts.disabled.out",
exit_code: 1,
http_server: true,
});
itest!(no_check_remote {
- args: "run --quiet --reload --no-check=remote no_check_remote.ts",
- output: "no_check_remote.ts.enabled.out",
+ args: "run --quiet --reload --no-check=remote run/no_check_remote.ts",
+ output: "run/no_check_remote.ts.enabled.out",
http_server: true,
});
itest!(runtime_decorators {
- args: "run --quiet --reload --no-check runtime_decorators.ts",
- output: "runtime_decorators.ts.out",
+ args: "run --quiet --reload --no-check run/runtime_decorators.ts",
+ output: "run/runtime_decorators.ts.out",
});
itest!(seed_random {
- args: "run --seed=100 seed_random.js",
- output: "seed_random.js.out",
+ args: "run --seed=100 run/seed_random.js",
+ output: "run/seed_random.js.out",
});
itest!(type_definitions {
- args: "run --reload type_definitions.ts",
- output: "type_definitions.ts.out",
+ args: "run --reload run/type_definitions.ts",
+ output: "run/type_definitions.ts.out",
});
itest!(type_definitions_for_export {
- args: "run --reload --check type_definitions_for_export.ts",
- output: "type_definitions_for_export.ts.out",
+ args: "run --reload --check run/type_definitions_for_export.ts",
+ output: "run/type_definitions_for_export.ts.out",
exit_code: 1,
});
itest!(type_directives_01 {
- args: "run --reload --check=all -L debug type_directives_01.ts",
- output: "type_directives_01.ts.out",
+ args: "run --reload --check=all -L debug run/type_directives_01.ts",
+ output: "run/type_directives_01.ts.out",
http_server: true,
});
itest!(type_directives_02 {
- args: "run --reload --check=all -L debug type_directives_02.ts",
- output: "type_directives_02.ts.out",
+ args: "run --reload --check=all -L debug run/type_directives_02.ts",
+ output: "run/type_directives_02.ts.out",
});
itest!(type_directives_js_main {
- args: "run --reload -L debug type_directives_js_main.js",
- output: "type_directives_js_main.js.out",
+ args: "run --reload -L debug run/type_directives_js_main.js",
+ output: "run/type_directives_js_main.js.out",
exit_code: 0,
});
itest!(type_directives_redirect {
- args: "run --reload --check type_directives_redirect.ts",
- output: "type_directives_redirect.ts.out",
+ args: "run --reload --check run/type_directives_redirect.ts",
+ output: "run/type_directives_redirect.ts.out",
http_server: true,
});
itest!(type_headers_deno_types {
- args: "run --reload --check type_headers_deno_types.ts",
- output: "type_headers_deno_types.ts.out",
+ args: "run --reload --check run/type_headers_deno_types.ts",
+ output: "run/type_headers_deno_types.ts.out",
http_server: true,
});
itest!(ts_type_imports {
- args: "run --reload --check ts_type_imports.ts",
- output: "ts_type_imports.ts.out",
+ args: "run --reload --check run/ts_type_imports.ts",
+ output: "run/ts_type_imports.ts.out",
exit_code: 1,
});
itest!(ts_decorators {
- args: "run --reload --check ts_decorators.ts",
- output: "ts_decorators.ts.out",
+ args: "run --reload --check run/ts_decorators.ts",
+ output: "run/ts_decorators.ts.out",
});
itest!(ts_type_only_import {
- args: "run --reload --check ts_type_only_import.ts",
- output: "ts_type_only_import.ts.out",
+ args: "run --reload --check run/ts_type_only_import.ts",
+ output: "run/ts_type_only_import.ts.out",
});
itest!(swc_syntax_error {
- args: "run --reload --check swc_syntax_error.ts",
- output: "swc_syntax_error.ts.out",
+ args: "run --reload --check run/swc_syntax_error.ts",
+ output: "run/swc_syntax_error.ts.out",
exit_code: 1,
});
itest!(unbuffered_stderr {
- args: "run --reload unbuffered_stderr.ts",
- output: "unbuffered_stderr.ts.out",
+ args: "run --reload run/unbuffered_stderr.ts",
+ output: "run/unbuffered_stderr.ts.out",
});
itest!(unbuffered_stdout {
- args: "run --quiet --reload unbuffered_stdout.ts",
- output: "unbuffered_stdout.ts.out",
+ args: "run --quiet --reload run/unbuffered_stdout.ts",
+ output: "run/unbuffered_stdout.ts.out",
});
itest!(v8_flags_run {
- args: "run --v8-flags=--expose-gc v8_flags.js",
- output: "v8_flags.js.out",
+ args: "run --v8-flags=--expose-gc run/v8_flags.js",
+ output: "run/v8_flags.js.out",
});
itest!(v8_flags_unrecognized {
args: "repl --v8-flags=--foo,bar,--trace-gc,-baz",
- output: "v8_flags_unrecognized.out",
+ output: "run/v8_flags_unrecognized.out",
exit_code: 1,
});
itest!(v8_help {
args: "repl --v8-flags=--help",
- output: "v8_help.out",
+ output: "run/v8_help.out",
});
itest!(unsupported_dynamic_import_scheme {
args: "eval import('xxx:')",
- output: "unsupported_dynamic_import_scheme.out",
+ output: "run/unsupported_dynamic_import_scheme.out",
exit_code: 1,
});
itest!(wasm {
- args: "run --quiet wasm.ts",
- output: "wasm.ts.out",
+ args: "run --quiet run/wasm.ts",
+ output: "run/wasm.ts.out",
});
itest!(wasm_shared {
- args: "run --quiet wasm_shared.ts",
- output: "wasm_shared.out",
+ args: "run --quiet run/wasm_shared.ts",
+ output: "run/wasm_shared.out",
});
itest!(wasm_async {
- args: "run wasm_async.js",
- output: "wasm_async.out",
+ args: "run run/wasm_async.js",
+ output: "run/wasm_async.out",
});
itest!(wasm_unreachable {
- args: "run --allow-read wasm_unreachable.js",
- output: "wasm_unreachable.out",
+ args: "run --allow-read run/wasm_unreachable.js",
+ output: "run/wasm_unreachable.out",
exit_code: 1,
});
itest!(wasm_url {
- args: "run --quiet --allow-net=localhost:4545 wasm_url.js",
- output: "wasm_url.out",
+ args: "run --quiet --allow-net=localhost:4545 run/wasm_url.js",
+ output: "run/wasm_url.out",
exit_code: 1,
http_server: true,
});
itest!(weakref {
- args: "run --quiet --reload weakref.ts",
- output: "weakref.ts.out",
+ args: "run --quiet --reload run/weakref.ts",
+ output: "run/weakref.ts.out",
});
itest!(top_level_await_order {
- args: "run --allow-read top_level_await_order.js",
- output: "top_level_await_order.out",
+ args: "run --allow-read run/top_level_await/order.js",
+ output: "run/top_level_await/order.out",
});
itest!(top_level_await_loop {
- args: "run --allow-read top_level_await_loop.js",
- output: "top_level_await_loop.out",
+ args: "run --allow-read run/top_level_await/loop.js",
+ output: "run/top_level_await/loop.out",
});
itest!(top_level_await_circular {
- args: "run --allow-read top_level_await_circular.js",
- output: "top_level_await_circular.out",
+ args: "run --allow-read run/top_level_await/circular.js",
+ output: "run/top_level_await/circular.out",
exit_code: 1,
});
// Regression test for https://github.com/denoland/deno/issues/11238.
itest!(top_level_await_nested {
- args: "run --allow-read top_level_await_nested/main.js",
- output: "top_level_await_nested.out",
+ args: "run --allow-read run/top_level_await/nested/main.js",
+ output: "run/top_level_await/nested.out",
});
itest!(top_level_await_unresolved {
- args: "run top_level_await_unresolved.js",
- output: "top_level_await_unresolved.out",
+ args: "run run/top_level_await/unresolved.js",
+ output: "run/top_level_await/unresolved.out",
exit_code: 1,
});
itest!(top_level_await {
- args: "run --allow-read top_level_await.js",
- output: "top_level_await.out",
+ args: "run --allow-read run/top_level_await/top_level_await.js",
+ output: "run/top_level_await/top_level_await.out",
});
itest!(top_level_await_ts {
- args: "run --quiet --allow-read top_level_await.ts",
- output: "top_level_await.out",
+ args: "run --quiet --allow-read run/top_level_await/top_level_await.ts",
+ output: "run/top_level_await/top_level_await.out",
});
itest!(top_level_for_await {
- args: "run --quiet top_level_for_await.js",
- output: "top_level_for_await.out",
+ args: "run --quiet run/top_level_await/top_level_for_await.js",
+ output: "run/top_level_await/top_level_for_await.out",
});
itest!(top_level_for_await_ts {
- args: "run --quiet top_level_for_await.ts",
- output: "top_level_for_await.out",
+ args: "run --quiet run/top_level_await/top_level_for_await.ts",
+ output: "run/top_level_await/top_level_for_await.out",
});
itest!(unstable_disabled {
- args: "run --reload --check unstable.ts",
+ args: "run --reload --check run/unstable.ts",
exit_code: 1,
- output: "unstable_disabled.out",
+ output: "run/unstable_disabled.out",
});
itest!(unstable_enabled {
- args: "run --quiet --reload --unstable unstable.ts",
- output: "unstable_enabled.out",
+ args: "run --quiet --reload --unstable run/unstable.ts",
+ output: "run/unstable_enabled.out",
});
itest!(unstable_disabled_js {
- args: "run --reload unstable.js",
- output: "unstable_disabled_js.out",
+ args: "run --reload run/unstable.js",
+ output: "run/unstable_disabled_js.out",
});
itest!(unstable_enabled_js {
- args: "run --quiet --reload --unstable unstable.ts",
- output: "unstable_enabled_js.out",
+ args: "run --quiet --reload --unstable run/unstable.ts",
+ output: "run/unstable_enabled_js.out",
});
itest!(unstable_worker {
- args: "run --reload --unstable --quiet --allow-read unstable_worker.ts",
- output: "unstable_worker.ts.out",
+ args: "run --reload --unstable --quiet --allow-read run/unstable_worker.ts",
+ output: "run/unstable_worker.ts.out",
});
-itest!(_053_import_compression {
- args: "run --quiet --reload --allow-net 053_import_compression/main.ts",
- output: "053_import_compression.out",
+itest!(import_compression {
+ args: "run --quiet --reload --allow-net run/import_compression/main.ts",
+ output: "run/import_compression/main.out",
http_server: true,
});
itest!(disallow_http_from_https_js {
- args: "run --quiet --reload --cert tls/RootCA.pem https://localhost:5545/disallow_http_from_https.js",
- output: "disallow_http_from_https_js.out",
+ args: "run --quiet --reload --cert tls/RootCA.pem https://localhost:5545/run/disallow_http_from_https.js",
+ output: "run/disallow_http_from_https_js.out",
http_server: true,
exit_code: 1,
});
itest!(disallow_http_from_https_ts {
- args: "run --quiet --reload --cert tls/RootCA.pem https://localhost:5545/disallow_http_from_https.ts",
- output: "disallow_http_from_https_ts.out",
+ args: "run --quiet --reload --cert tls/RootCA.pem https://localhost:5545/run/disallow_http_from_https.ts",
+ output: "run/disallow_http_from_https_ts.out",
http_server: true,
exit_code: 1,
});
itest!(dynamic_import_conditional {
- args: "run --quiet --reload dynamic_import_conditional.js",
- output: "dynamic_import_conditional.js.out",
+ args: "run --quiet --reload run/dynamic_import_conditional.js",
+ output: "run/dynamic_import_conditional.js.out",
});
itest!(tsx_imports {
- args: "run --reload --check tsx_imports.ts",
- output: "tsx_imports.ts.out",
+ args: "run --reload --check run/tsx_imports/tsx_imports.ts",
+ output: "run/tsx_imports/tsx_imports.ts.out",
});
itest!(fix_dynamic_import_errors {
- args: "run --reload fix_dynamic_import_errors.js",
- output: "fix_dynamic_import_errors.js.out",
+ args: "run --reload run/fix_dynamic_import_errors.js",
+ output: "run/fix_dynamic_import_errors.js.out",
});
itest!(fix_emittable_skipped {
- args: "run --reload fix_emittable_skipped.js",
- output: "fix_emittable_skipped.ts.out",
+ args: "run --reload run/fix_emittable_skipped.js",
+ output: "run/fix_emittable_skipped.ts.out",
});
itest!(fix_exotic_specifiers {
- args: "run --quiet --reload fix_exotic_specifiers.ts",
- output: "fix_exotic_specifiers.ts.out",
+ args: "run --quiet --reload run/fix_exotic_specifiers.ts",
+ output: "run/fix_exotic_specifiers.ts.out",
});
itest!(fix_js_import_js {
- args: "run --quiet --reload fix_js_import_js.ts",
- output: "fix_js_import_js.ts.out",
+ args: "run --quiet --reload run/fix_js_import_js.ts",
+ output: "run/fix_js_import_js.ts.out",
});
itest!(fix_js_imports {
- args: "run --quiet --reload fix_js_imports.ts",
- output: "fix_js_imports.ts.out",
+ args: "run --quiet --reload run/fix_js_imports.ts",
+ output: "run/fix_js_imports.ts.out",
});
itest!(fix_tsc_file_exists {
args: "run --quiet --reload tsc/test.js",
- output: "fix_tsc_file_exists.out",
+ output: "run/fix_tsc_file_exists.out",
});
itest!(fix_worker_dispatchevent {
- args: "run --quiet --reload fix_worker_dispatchevent.ts",
- output: "fix_worker_dispatchevent.ts.out",
+ args: "run --quiet --reload run/fix_worker_dispatchevent.ts",
+ output: "run/fix_worker_dispatchevent.ts.out",
});
itest!(es_private_fields {
- args: "run --quiet --reload es_private_fields.js",
- output: "es_private_fields.js.out",
+ args: "run --quiet --reload run/es_private_fields.js",
+ output: "run/es_private_fields.js.out",
});
itest!(cjs_imports {
- args: "run --quiet --reload cjs_imports.ts",
- output: "cjs_imports.ts.out",
+ args: "run --quiet --reload run/cjs_imports/main.ts",
+ output: "run/cjs_imports/main.out",
});
itest!(ts_import_from_js {
- args: "run --quiet --reload ts_import_from_js.js",
- output: "ts_import_from_js.js.out",
+ args: "run --quiet --reload run/ts_import_from_js/main.js",
+ output: "run/ts_import_from_js/main.out",
http_server: true,
});
itest!(jsx_import_from_ts {
- args: "run --quiet --reload jsx_import_from_ts.ts",
- output: "jsx_import_from_ts.ts.out",
+ args: "run --quiet --reload run/jsx_import_from_ts.ts",
+ output: "run/jsx_import_from_ts.ts.out",
});
itest!(jsx_import_source_pragma {
- args: "run --reload jsx_import_source_pragma.tsx",
- output: "jsx_import_source.out",
+ args: "run --reload run/jsx_import_source_pragma.tsx",
+ output: "run/jsx_import_source.out",
http_server: true,
});
itest!(jsx_import_source_pragma_with_config {
- args: "run --reload --config jsx/deno-jsx.jsonc jsx_import_source_pragma.tsx",
- output: "jsx_import_source.out",
+ args:
+ "run --reload --config jsx/deno-jsx.jsonc run/jsx_import_source_pragma.tsx",
+ output: "run/jsx_import_source.out",
http_server: true,
});
itest!(jsx_import_source_pragma_with_dev_config {
args:
- "run --reload --config jsx/deno-jsxdev.jsonc jsx_import_source_pragma.tsx",
- output: "jsx_import_source_dev.out",
+ "run --reload --config jsx/deno-jsxdev.jsonc run/jsx_import_source_pragma.tsx",
+ output: "run/jsx_import_source_dev.out",
http_server: true,
});
itest!(jsx_import_source_no_pragma {
args:
- "run --reload --config jsx/deno-jsx.jsonc jsx_import_source_no_pragma.tsx",
- output: "jsx_import_source.out",
+ "run --reload --config jsx/deno-jsx.jsonc run/jsx_import_source_no_pragma.tsx",
+ output: "run/jsx_import_source.out",
http_server: true,
});
itest!(jsx_import_source_no_pragma_dev {
- args: "run --reload --config jsx/deno-jsxdev.jsonc jsx_import_source_no_pragma.tsx",
- output: "jsx_import_source_dev.out",
+ args: "run --reload --config jsx/deno-jsxdev.jsonc run/jsx_import_source_no_pragma.tsx",
+ output: "run/jsx_import_source_dev.out",
http_server: true,
});
itest!(jsx_import_source_pragma_import_map {
- args: "run --reload --import-map jsx/import-map.json jsx_import_source_pragma_import_map.tsx",
- output: "jsx_import_source_import_map.out",
+ args: "run --reload --import-map jsx/import-map.json run/jsx_import_source_pragma_import_map.tsx",
+ output: "run/jsx_import_source_import_map.out",
http_server: true,
});
itest!(jsx_import_source_pragma_import_map_dev {
- args: "run --reload --import-map jsx/import-map.json --config jsx/deno-jsxdev-import-map.jsonc jsx_import_source_pragma_import_map.tsx",
- output: "jsx_import_source_import_map_dev.out",
+ args: "run --reload --import-map jsx/import-map.json --config jsx/deno-jsxdev-import-map.jsonc run/jsx_import_source_pragma_import_map.tsx",
+ output: "run/jsx_import_source_import_map_dev.out",
http_server: true,
});
itest!(jsx_import_source_import_map {
- args: "run --reload --import-map jsx/import-map.json --config jsx/deno-jsx-import-map.jsonc jsx_import_source_no_pragma.tsx",
- output: "jsx_import_source_import_map.out",
+ args: "run --reload --import-map jsx/import-map.json --config jsx/deno-jsx-import-map.jsonc run/jsx_import_source_no_pragma.tsx",
+ output: "run/jsx_import_source_import_map.out",
http_server: true,
});
itest!(jsx_import_source_import_map_dev {
- args: "run --reload --import-map jsx/import-map.json --config jsx/deno-jsxdev-import-map.jsonc jsx_import_source_no_pragma.tsx",
- output: "jsx_import_source_import_map_dev.out",
+ args: "run --reload --import-map jsx/import-map.json --config jsx/deno-jsxdev-import-map.jsonc run/jsx_import_source_no_pragma.tsx",
+ output: "run/jsx_import_source_import_map_dev.out",
http_server: true,
});
itest!(jsx_import_source_import_map_scoped {
args: "run --reload --import-map jsx/import-map-scoped.json --config jsx/deno-jsx-import-map.jsonc subdir/jsx_import_source_no_pragma.tsx",
- output: "jsx_import_source_import_map.out",
+ output: "run/jsx_import_source_import_map.out",
http_server: true,
});
itest!(jsx_import_source_import_map_scoped_dev {
args: "run --reload --import-map jsx/import-map-scoped.json --config jsx/deno-jsxdev-import-map.jsonc subdir/jsx_import_source_no_pragma.tsx",
- output: "jsx_import_source_import_map_dev.out",
+ output: "run/jsx_import_source_import_map_dev.out",
http_server: true,
});
itest!(jsx_import_source_pragma_no_check {
- args: "run --reload --no-check jsx_import_source_pragma.tsx",
- output: "jsx_import_source.out",
+ args: "run --reload --no-check run/jsx_import_source_pragma.tsx",
+ output: "run/jsx_import_source.out",
http_server: true,
});
itest!(jsx_import_source_pragma_with_config_no_check {
- args: "run --reload --config jsx/deno-jsx.jsonc --no-check jsx_import_source_pragma.tsx",
- output: "jsx_import_source.out",
+ args: "run --reload --config jsx/deno-jsx.jsonc --no-check run/jsx_import_source_pragma.tsx",
+ output: "run/jsx_import_source.out",
http_server: true,
});
-// itest!(jsx_import_source_pragma_with_dev_config_no_check {
-// args:
-// "run --reload --config jsx/deno-jsxdev.jsonc --no-check jsx_import_source_pragma.tsx",
-// output: "jsx_import_source_dev.out",
-// http_server: true,
-// });
-
itest!(jsx_import_source_no_pragma_no_check {
args:
- "run --reload --config jsx/deno-jsx.jsonc --no-check jsx_import_source_no_pragma.tsx",
- output: "jsx_import_source.out",
+ "run --reload --config jsx/deno-jsx.jsonc --no-check run/jsx_import_source_no_pragma.tsx",
+ output: "run/jsx_import_source.out",
http_server: true,
});
-// itest!(jsx_import_source_no_pragma_dev_no_check {
-// args: "run --reload --config jsx/deno-jsxdev.jsonc --no-check jsx_import_source_no_pragma.tsx",
-// output: "jsx_import_source_dev.out",
-// http_server: true,
-// });
-
itest!(jsx_import_source_pragma_import_map_no_check {
- args: "run --reload --import-map jsx/import-map.json --no-check jsx_import_source_pragma_import_map.tsx",
- output: "jsx_import_source_import_map.out",
+ args: "run --reload --import-map jsx/import-map.json --no-check run/jsx_import_source_pragma_import_map.tsx",
+ output: "run/jsx_import_source_import_map.out",
http_server: true,
});
-// itest!(jsx_import_source_pragma_import_map_dev_no_check {
-// args: "run --reload --import-map jsx/import-map.json --config jsx/deno-jsxdev-import-map.jsonc --no-check jsx_import_source_pragma_import_map.tsx",
-// output: "jsx_import_source_import_map_dev.out",
-// http_server: true,
-// });
-
itest!(jsx_import_source_import_map_no_check {
- args: "run --reload --import-map jsx/import-map.json --config jsx/deno-jsx-import-map.jsonc --no-check jsx_import_source_no_pragma.tsx",
- output: "jsx_import_source_import_map.out",
+ args: "run --reload --import-map jsx/import-map.json --config jsx/deno-jsx-import-map.jsonc --no-check run/jsx_import_source_no_pragma.tsx",
+ output: "run/jsx_import_source_import_map.out",
http_server: true,
});
-// itest!(jsx_import_source_import_map_dev_no_check {
-// args: "run --reload --import-map jsx/import-map.json --config jsx/deno-jsxdev-import-map.jsonc --no-check jsx_import_source_no_pragma.tsx",
-// output: "jsx_import_source_import_map_dev.out",
-// http_server: true,
-// });
+itest!(jsx_import_source_error {
+ args: "run --config jsx/deno-jsx-error.jsonc --check run/jsx_import_source_no_pragma.tsx",
+ output: "run/jsx_import_source_error.out",
+ exit_code: 1,
+});
// TODO(#11128): Flaky. Re-enable later.
// itest!(single_compile_with_reload {
-// args: "run --reload --allow-read single_compile_with_reload.ts",
-// output: "single_compile_with_reload.ts.out",
+// args: "run --relcert/oad --allow-read run/single_compile_with_reload.ts",
+// output: "run/single_compile_with_reload.ts.out",
// });
itest!(proto_exploit {
- args: "run proto_exploit.js",
- output: "proto_exploit.js.out",
+ args: "run run/proto_exploit.js",
+ output: "run/proto_exploit.js.out",
});
itest!(reference_types {
- args: "run --reload --quiet reference_types.ts",
- output: "reference_types.ts.out",
+ args: "run --reload --quiet run/reference_types.ts",
+ output: "run/reference_types.ts.out",
});
itest!(references_types_remote {
http_server: true,
- args: "run --reload --quiet reference_types_remote.ts",
- output: "reference_types_remote.ts.out",
+ args: "run --reload --quiet run/reference_types_remote.ts",
+ output: "run/reference_types_remote.ts.out",
+});
+
+itest!(reference_types_error {
+ args:
+ "run --config run/checkjs.tsconfig.json --check run/reference_types_error.js",
+ output: "run/reference_types_error.js.out",
+ exit_code: 1,
+});
+
+itest!(reference_types_error_no_check {
+ args: "run --no-check run/reference_types_error.js",
+ output_str: Some(""),
});
itest!(import_data_url_error_stack {
- args: "run --quiet --reload import_data_url_error_stack.ts",
- output: "import_data_url_error_stack.ts.out",
+ args: "run --quiet --reload run/import_data_url_error_stack.ts",
+ output: "run/import_data_url_error_stack.ts.out",
exit_code: 1,
});
itest!(import_data_url_import_relative {
- args: "run --quiet --reload import_data_url_import_relative.ts",
- output: "import_data_url_import_relative.ts.out",
+ args: "run --quiet --reload run/import_data_url_import_relative.ts",
+ output: "run/import_data_url_import_relative.ts.out",
exit_code: 1,
});
itest!(import_data_url_import_map {
- args: "run --quiet --reload --import-map import_maps/import_map.json import_data_url.ts",
- output: "import_data_url.ts.out",
+ args: "run --quiet --reload --import-map import_maps/import_map.json run/import_data_url.ts",
+ output: "run/import_data_url.ts.out",
});
itest!(import_data_url_imports {
- args: "run --quiet --reload import_data_url_imports.ts",
- output: "import_data_url_imports.ts.out",
+ args: "run --quiet --reload run/import_data_url_imports.ts",
+ output: "run/import_data_url_imports.ts.out",
http_server: true,
});
itest!(import_data_url_jsx {
- args: "run --quiet --reload import_data_url_jsx.ts",
- output: "import_data_url_jsx.ts.out",
+ args: "run --quiet --reload run/import_data_url_jsx.ts",
+ output: "run/import_data_url_jsx.ts.out",
});
itest!(import_data_url {
- args: "run --quiet --reload import_data_url.ts",
- output: "import_data_url.ts.out",
+ args: "run --quiet --reload run/import_data_url.ts",
+ output: "run/import_data_url.ts.out",
});
itest!(import_dynamic_data_url {
- args: "run --quiet --reload import_dynamic_data_url.ts",
- output: "import_dynamic_data_url.ts.out",
+ args: "run --quiet --reload run/import_dynamic_data_url.ts",
+ output: "run/import_dynamic_data_url.ts.out",
});
itest!(import_blob_url_error_stack {
- args: "run --quiet --reload import_blob_url_error_stack.ts",
- output: "import_blob_url_error_stack.ts.out",
+ args: "run --quiet --reload run/import_blob_url_error_stack.ts",
+ output: "run/import_blob_url_error_stack.ts.out",
exit_code: 1,
});
itest!(import_blob_url_import_relative {
- args: "run --quiet --reload import_blob_url_import_relative.ts",
- output: "import_blob_url_import_relative.ts.out",
+ args: "run --quiet --reload run/import_blob_url_import_relative.ts",
+ output: "run/import_blob_url_import_relative.ts.out",
exit_code: 1,
});
itest!(import_blob_url_imports {
args:
- "run --quiet --reload --allow-net=localhost:4545 import_blob_url_imports.ts",
- output: "import_blob_url_imports.ts.out",
+ "run --quiet --reload --allow-net=localhost:4545 run/import_blob_url_imports.ts",
+ output: "run/import_blob_url_imports.ts.out",
http_server: true,
});
itest!(import_blob_url_jsx {
- args: "run --quiet --reload import_blob_url_jsx.ts",
- output: "import_blob_url_jsx.ts.out",
+ args: "run --quiet --reload run/import_blob_url_jsx.ts",
+ output: "run/import_blob_url_jsx.ts.out",
});
itest!(import_blob_url {
- args: "run --quiet --reload import_blob_url.ts",
- output: "import_blob_url.ts.out",
+ args: "run --quiet --reload run/import_blob_url.ts",
+ output: "run/import_blob_url.ts.out",
});
itest!(import_file_with_colon {
- args: "run --quiet --reload import_file_with_colon.ts",
- output: "import_file_with_colon.ts.out",
+ args: "run --quiet --reload run/import_file_with_colon.ts",
+ output: "run/import_file_with_colon.ts.out",
http_server: true,
});
itest!(import_extensionless {
- args: "run --quiet --reload import_extensionless.ts",
- output: "import_extensionless.ts.out",
+ args: "run --quiet --reload run/import_extensionless.ts",
+ output: "run/import_extensionless.ts.out",
http_server: true,
});
itest!(classic_workers_event_loop {
args:
- "run --enable-testing-features-do-not-use classic_workers_event_loop.js",
- output: "classic_workers_event_loop.js.out",
+ "run --enable-testing-features-do-not-use run/classic_workers_event_loop.js",
+ output: "run/classic_workers_event_loop.js.out",
});
// FIXME(bartlomieju): disabled, because this test is very flaky on CI
// itest!(local_sources_not_cached_in_memory {
-// args: "run --allow-read --allow-write no_mem_cache.js",
-// output: "no_mem_cache.js.out",
+// args: "run --allow-read --allow-write run/no_mem_cache.js",
+// output: "run/no_mem_cache.js.out",
// });
// This test checks that inline source map data is used. It uses a hand crafted
@@ -1529,8 +1538,8 @@ itest!(classic_workers_event_loop {
// Source line is not remapped because no inline source contents are included in
// the sourcemap and the file is not present in the dependency graph.
itest!(inline_js_source_map_2 {
- args: "run --quiet inline_js_source_map_2.js",
- output: "inline_js_source_map_2.js.out",
+ args: "run --quiet run/inline_js_source_map_2.js",
+ output: "run/inline_js_source_map_2.js.out",
exit_code: 1,
});
@@ -1540,8 +1549,8 @@ itest!(inline_js_source_map_2 {
// Source line remapped using th inline source contents that are included in the
// inline source map.
itest!(inline_js_source_map_2_with_inline_contents {
- args: "run --quiet inline_js_source_map_2_with_inline_contents.js",
- output: "inline_js_source_map_2_with_inline_contents.js.out",
+ args: "run --quiet run/inline_js_source_map_2_with_inline_contents.js",
+ output: "run/inline_js_source_map_2_with_inline_contents.js.out",
exit_code: 1,
});
@@ -1552,8 +1561,8 @@ itest!(inline_js_source_map_2_with_inline_contents {
// was not commented out. The source line is remapped using source contents that
// from the module graph.
itest!(inline_js_source_map_with_contents_from_graph {
- args: "run --quiet inline_js_source_map_with_contents_from_graph.js",
- output: "inline_js_source_map_with_contents_from_graph.js.out",
+ args: "run --quiet run/inline_js_source_map_with_contents_from_graph.js",
+ output: "run/inline_js_source_map_with_contents_from_graph.js.out",
exit_code: 1,
http_server: true,
});
@@ -1564,78 +1573,62 @@ itest!(inline_js_source_map_with_contents_from_graph {
// `program_state.maybe_import_map` to access the import map underneath.
itest!(error_import_map_unable_to_load {
args: "run --import-map=import_maps/does_not_exist.json import_maps/test.ts",
- output: "error_import_map_unable_to_load.out",
+ output: "run/error_import_map_unable_to_load.out",
exit_code: 1,
});
// Test that setting `self` in the main thread to some other value doesn't break
// the world.
itest!(replace_self {
- args: "run replace_self.js",
- output: "replace_self.js.out",
+ args: "run run/replace_self.js",
+ output: "run/replace_self.js.out",
});
itest!(worker_event_handler_test {
- args: "run --quiet --reload --allow-read worker_event_handler_test.js",
- output: "worker_event_handler_test.js.out",
+ args: "run --quiet --reload --allow-read run/worker_event_handler_test.js",
+ output: "run/worker_event_handler_test.js.out",
});
itest!(worker_close_race {
- args: "run --quiet --reload --allow-read worker_close_race.js",
- output: "worker_close_race.js.out",
+ args: "run --quiet --reload --allow-read run/worker_close_race.js",
+ output: "run/worker_close_race.js.out",
});
itest!(worker_drop_handle_race {
- args: "run --quiet --reload --allow-read worker_drop_handle_race.js",
- output: "worker_drop_handle_race.js.out",
+ args: "run --quiet --reload --allow-read run/worker_drop_handle_race.js",
+ output: "run/worker_drop_handle_race.js.out",
exit_code: 1,
});
itest!(worker_drop_handle_race_terminate {
- args: "run --unstable worker_drop_handle_race_terminate.js",
- output: "worker_drop_handle_race_terminate.js.out",
+ args: "run --unstable run/worker_drop_handle_race_terminate.js",
+ output: "run/worker_drop_handle_race_terminate.js.out",
});
itest!(worker_close_nested {
- args: "run --quiet --reload --allow-read worker_close_nested.js",
- output: "worker_close_nested.js.out",
+ args: "run --quiet --reload --allow-read run/worker_close_nested.js",
+ output: "run/worker_close_nested.js.out",
});
itest!(worker_message_before_close {
- args: "run --quiet --reload --allow-read worker_message_before_close.js",
- output: "worker_message_before_close.js.out",
+ args: "run --quiet --reload --allow-read run/worker_message_before_close.js",
+ output: "run/worker_message_before_close.js.out",
});
itest!(worker_close_in_wasm_reactions {
- args: "run --quiet --reload --allow-read worker_close_in_wasm_reactions.js",
- output: "worker_close_in_wasm_reactions.js.out",
-});
-
-itest!(reference_types_error {
- args: "run --config checkjs.tsconfig.json --check reference_types_error.js",
- output: "reference_types_error.js.out",
- exit_code: 1,
-});
-
-itest!(reference_types_error_no_check {
- args: "run --no-check reference_types_error.js",
- output_str: Some(""),
-});
-
-itest!(jsx_import_source_error {
- args: "run --config jsx/deno-jsx-error.jsonc --check jsx_import_source_no_pragma.tsx",
- output: "jsx_import_source_error.out",
- exit_code: 1,
+ args:
+ "run --quiet --reload --allow-read run/worker_close_in_wasm_reactions.js",
+ output: "run/worker_close_in_wasm_reactions.js.out",
});
itest!(shebang_tsc {
- args: "run --quiet shebang.ts",
- output: "shebang.ts.out",
+ args: "run --quiet --check run/shebang.ts",
+ output: "run/shebang.ts.out",
});
itest!(shebang_swc {
- args: "run --quiet --no-check shebang.ts",
- output: "shebang.ts.out",
+ args: "run --quiet run/shebang.ts",
+ output: "run/shebang.ts.out",
});
itest!(shebang_with_json_imports_tsc {
@@ -1655,7 +1648,7 @@ fn no_validate_asm() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
- .arg("no_validate_asm.js")
+ .arg("run/no_validate_asm.js")
.stderr(Stdio::piped())
.stdout(Stdio::piped())
.spawn()
@@ -1673,7 +1666,7 @@ fn exec_path() {
.current_dir(util::testdata_path())
.arg("run")
.arg("--allow-read")
- .arg("exec_path.ts")
+ .arg("run/exec_path.ts")
.stdout(Stdio::piped())
.spawn()
.unwrap()
@@ -1701,7 +1694,7 @@ fn run_deno_script_constrained(
script_path: std::path::PathBuf,
constraints: WinProcConstraints,
) -> Result<(), i64> {
- let file_path = "DenoWinRunner.ps1";
+ let file_path = "assets/DenoWinRunner.ps1";
let constraints = match constraints {
WinProcConstraints::NoStdIn => "1",
WinProcConstraints::NoStdOut => "2",
@@ -1799,7 +1792,7 @@ fn rust_log() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
- .arg("001_hello.js")
+ .arg("run/001_hello.js")
.stderr(Stdio::piped())
.spawn()
.unwrap()
@@ -1812,7 +1805,7 @@ fn rust_log() {
let output = util::deno_cmd()
.current_dir(util::testdata_path())
.arg("run")
- .arg("001_hello.js")
+ .arg("run/001_hello.js")
.env("RUST_LOG", "debug")
.stderr(Stdio::piped())
.spawn()
@@ -1833,7 +1826,7 @@ fn dont_cache_on_check_fail() {
.arg("run")
.arg("--check=all")
.arg("--reload")
- .arg("error_003_typescript.ts")
+ .arg("run/error_003_typescript.ts")
.stderr(Stdio::piped())
.spawn()
.unwrap()
@@ -1847,7 +1840,7 @@ fn dont_cache_on_check_fail() {
.current_dir(util::testdata_path())
.arg("run")
.arg("--check=all")
- .arg("error_003_typescript.ts")
+ .arg("run/error_003_typescript.ts")
.stderr(Stdio::piped())
.spawn()
.unwrap()
@@ -1869,7 +1862,7 @@ mod permissions {
.arg("run")
.arg("--unstable")
.arg(format!("--allow-{0}", permission))
- .arg("permission_test.ts")
+ .arg("run/permission_test.ts")
.arg(format!("{0}Required", permission))
.spawn()
.unwrap()
@@ -1885,7 +1878,10 @@ mod permissions {
for permission in &util::PERMISSION_VARIANTS {
let (_, err) = util::run_and_collect_output(
false,
- &format!("run --unstable permission_test.ts {0}Required", permission),
+ &format!(
+ "run --unstable run/permission_test.ts {0}Required",
+ permission
+ ),
None,
None,
false,
@@ -1909,9 +1905,9 @@ mod permissions {
.into_string()
.unwrap()
))
- .arg("complex_permissions_test.ts")
+ .arg("run/complex_permissions_test.ts")
.arg(permission)
- .arg("complex_permissions_test.ts")
+ .arg("run/complex_permissions_test.ts")
.spawn()
.unwrap()
.wait()
@@ -1927,7 +1923,7 @@ mod permissions {
let (_, err) = util::run_and_collect_output(
false,
&format!(
- "run --allow-{0}={1} complex_permissions_test.ts {0} {2}",
+ "run --allow-{0}={1} run/complex_permissions_test.ts {0} {2}",
permission,
util::testdata_path()
.into_os_string()
@@ -1962,9 +1958,9 @@ mod permissions {
.into_string()
.unwrap()
))
- .arg("complex_permissions_test.ts")
+ .arg("run/complex_permissions_test.ts")
.arg(permission)
- .arg("complex_permissions_test.ts")
+ .arg("run/complex_permissions_test.ts")
.spawn()
.unwrap()
.wait()
@@ -1989,7 +1985,7 @@ mod permissions {
let (_, err) = util::run_and_collect_output(
false,
&format!(
- "run --allow-{0}={1},{2} complex_permissions_test.ts {0} {3}",
+ "run --allow-{0}={1},{2} run/complex_permissions_test.ts {0} {3}",
permission,
test_dir,
js_dir,
@@ -2024,9 +2020,9 @@ mod permissions {
.current_dir(&util::testdata_path())
.arg("run")
.arg(format!("--allow-{0}={1},{2}", permission, test_dir, js_dir))
- .arg("complex_permissions_test.ts")
+ .arg("run/complex_permissions_test.ts")
.arg(permission)
- .arg("complex_permissions_test.ts")
+ .arg("run/complex_permissions_test.ts")
.spawn()
.unwrap()
.wait()
@@ -2043,9 +2039,9 @@ mod permissions {
.current_dir(&util::testdata_path())
.arg("run")
.arg(format!("--allow-{0}=.", permission))
- .arg("complex_permissions_test.ts")
+ .arg("run/complex_permissions_test.ts")
.arg(permission)
- .arg("complex_permissions_test.ts")
+ .arg("run/complex_permissions_test.ts")
.spawn()
.unwrap()
.wait()
@@ -2062,9 +2058,9 @@ mod permissions {
.current_dir(&util::testdata_path())
.arg("run")
.arg(format!("--allow-{0}=tls/../", permission))
- .arg("complex_permissions_test.ts")
+ .arg("run/complex_permissions_test.ts")
.arg(permission)
- .arg("complex_permissions_test.ts")
+ .arg("run/complex_permissions_test.ts")
.spawn()
.unwrap()
.wait()
@@ -2077,7 +2073,7 @@ mod permissions {
fn net_fetch_allow_localhost_4545() {
let (_, err) = util::run_and_collect_output(
true,
- "run --allow-net=localhost:4545 complex_permissions_test.ts netFetch http://localhost:4545/",
+ "run --allow-net=localhost:4545 run/complex_permissions_test.ts netFetch http://localhost:4545/",
None,
None,
true,
@@ -2089,7 +2085,7 @@ mod permissions {
fn net_fetch_allow_deno_land() {
let (_, err) = util::run_and_collect_output(
false,
- "run --allow-net=deno.land complex_permissions_test.ts netFetch http://localhost:4545/",
+ "run --allow-net=deno.land run/complex_permissions_test.ts netFetch http://localhost:4545/",
None,
None,
true,
@@ -2101,7 +2097,7 @@ mod permissions {
fn net_fetch_localhost_4545_fail() {
let (_, err) = util::run_and_collect_output(
false,
- "run --allow-net=localhost:4545 complex_permissions_test.ts netFetch http://localhost:4546/",
+ "run --allow-net=localhost:4545 run/complex_permissions_test.ts netFetch http://localhost:4546/",
None,
None,
true,
@@ -2113,7 +2109,7 @@ mod permissions {
fn net_fetch_localhost() {
let (_, err) = util::run_and_collect_output(
true,
- "run --allow-net=localhost complex_permissions_test.ts netFetch http://localhost:4545/ http://localhost:4546/ http://localhost:4547/",
+ "run --allow-net=localhost run/complex_permissions_test.ts netFetch http://localhost:4545/ http://localhost:4546/ http://localhost:4547/",
None,
None,
true,
@@ -2125,7 +2121,7 @@ mod permissions {
fn net_connect_allow_localhost_ip_4555() {
let (_, err) = util::run_and_collect_output(
true,
- "run --allow-net=127.0.0.1:4545 complex_permissions_test.ts netConnect 127.0.0.1:4545",
+ "run --allow-net=127.0.0.1:4545 run/complex_permissions_test.ts netConnect 127.0.0.1:4545",
None,
None,
true,
@@ -2137,7 +2133,7 @@ mod permissions {
fn net_connect_allow_deno_land() {
let (_, err) = util::run_and_collect_output(
false,
- "run --allow-net=deno.land complex_permissions_test.ts netConnect 127.0.0.1:4546",
+ "run --allow-net=deno.land run/complex_permissions_test.ts netConnect 127.0.0.1:4546",
None,
None,
true,
@@ -2149,7 +2145,7 @@ mod permissions {
fn net_connect_allow_localhost_ip_4545_fail() {
let (_, err) = util::run_and_collect_output(
false,
- "run --allow-net=127.0.0.1:4545 complex_permissions_test.ts netConnect 127.0.0.1:4546",
+ "run --allow-net=127.0.0.1:4545 run/complex_permissions_test.ts netConnect 127.0.0.1:4546",
None,
None,
true,
@@ -2161,7 +2157,7 @@ mod permissions {
fn net_connect_allow_localhost_ip() {
let (_, err) = util::run_and_collect_output(
true,
- "run --allow-net=127.0.0.1 complex_permissions_test.ts netConnect 127.0.0.1:4545 127.0.0.1:4546 127.0.0.1:4547",
+ "run --allow-net=127.0.0.1 run/complex_permissions_test.ts netConnect 127.0.0.1:4545 127.0.0.1:4546 127.0.0.1:4547",
None,
None,
true,
@@ -2173,7 +2169,7 @@ mod permissions {
fn net_listen_allow_localhost_4555() {
let (_, err) = util::run_and_collect_output(
true,
- "run --allow-net=localhost:4558 complex_permissions_test.ts netListen localhost:4558",
+ "run --allow-net=localhost:4558 run/complex_permissions_test.ts netListen localhost:4558",
None,
None,
false,
@@ -2185,7 +2181,7 @@ mod permissions {
fn net_listen_allow_deno_land() {
let (_, err) = util::run_and_collect_output(
false,
- "run --allow-net=deno.land complex_permissions_test.ts netListen localhost:4545",
+ "run --allow-net=deno.land run/complex_permissions_test.ts netListen localhost:4545",
None,
None,
false,
@@ -2197,7 +2193,7 @@ mod permissions {
fn net_listen_allow_localhost_4555_fail() {
let (_, err) = util::run_and_collect_output(
false,
- "run --allow-net=localhost:4555 complex_permissions_test.ts netListen localhost:4556",
+ "run --allow-net=localhost:4555 run/complex_permissions_test.ts netListen localhost:4556",
None,
None,
false,
@@ -2211,7 +2207,7 @@ mod permissions {
// target/debug/test_server
let (_, err) = util::run_and_collect_output(
true,
- "run --allow-net=localhost complex_permissions_test.ts netListen localhost:4600",
+ "run --allow-net=localhost run/complex_permissions_test.ts netListen localhost:4600",
None,
None,
false,
@@ -2221,7 +2217,7 @@ mod permissions {
#[test]
fn _061_permissions_request() {
- let args = "run --quiet 061_permissions_request.ts";
+ let args = "run --quiet run/061_permissions_request.ts";
use util::PtyData::*;
util::test_pty2(args, vec![
Output("⚠️ ️Deno requests read access to \"foo\". Run again with --allow-read to bypass this prompt.\r\n Allow? [y/n (y = yes allow, n = no deny)] "),
@@ -2236,7 +2232,7 @@ mod permissions {
#[test]
fn _062_permissions_request_global() {
- let args = "run --quiet 062_permissions_request_global.ts";
+ let args = "run --quiet run/062_permissions_request_global.ts";
use util::PtyData::*;
util::test_pty2(args, vec![
Output("⚠️ ️Deno requests read access. Run again with --allow-read to bypass this prompt.\r\n Allow? [y/n (y = yes allow, n = no deny)] "),
@@ -2248,18 +2244,18 @@ mod permissions {
}
itest!(_063_permissions_revoke {
- args: "run --allow-read=foo,bar 063_permissions_revoke.ts",
- output: "063_permissions_revoke.ts.out",
+ args: "run --allow-read=foo,bar run/063_permissions_revoke.ts",
+ output: "run/063_permissions_revoke.ts.out",
});
itest!(_064_permissions_revoke_global {
- args: "run --allow-read=foo,bar 064_permissions_revoke_global.ts",
- output: "064_permissions_revoke_global.ts.out",
+ args: "run --allow-read=foo,bar run/064_permissions_revoke_global.ts",
+ output: "run/064_permissions_revoke_global.ts.out",
});
#[test]
fn _066_prompt() {
- let args = "run --quiet --unstable 066_prompt.ts";
+ let args = "run --quiet --unstable run/066_prompt.ts";
use util::PtyData::*;
util::test_pty2(
args,
@@ -2337,25 +2333,25 @@ mod permissions {
}
itest!(tls_starttls {
- args: "run --quiet --reload --allow-net --allow-read --unstable --cert tls/RootCA.pem tls_starttls.js",
- output: "tls.out",
+ args: "run --quiet --reload --allow-net --allow-read --unstable --cert tls/RootCA.pem run/tls_starttls.js",
+ output: "run/tls.out",
});
itest!(tls_connecttls {
- args: "run --quiet --reload --allow-net --allow-read --cert tls/RootCA.pem tls_connecttls.js",
- output: "tls.out",
+ args: "run --quiet --reload --allow-net --allow-read --cert tls/RootCA.pem run/tls_connecttls.js",
+ output: "run/tls.out",
});
itest!(byte_order_mark {
- args: "run --no-check byte_order_mark.ts",
- output: "byte_order_mark.out",
+ args: "run --no-check run/byte_order_mark.ts",
+ output: "run/byte_order_mark.out",
});
#[test]
fn issue9750() {
use util::PtyData::*;
util::test_pty2(
- "run --prompt issue9750.js",
+ "run --prompt run/issue9750.js",
vec![
Output("Enter 'yy':\r\n"),
Input("yy\n"),
@@ -2370,20 +2366,20 @@ fn issue9750() {
// Regression test for https://github.com/denoland/deno/issues/11451.
itest!(dom_exception_formatting {
- args: "run dom_exception_formatting.ts",
- output: "dom_exception_formatting.ts.out",
+ args: "run run/dom_exception_formatting.ts",
+ output: "run/dom_exception_formatting.ts.out",
exit_code: 1,
});
itest!(long_data_url_formatting {
- args: "run long_data_url_formatting.ts",
- output: "long_data_url_formatting.ts.out",
+ args: "run run/long_data_url_formatting.ts",
+ output: "run/long_data_url_formatting.ts.out",
exit_code: 1,
});
itest!(eval_context_throw_dom_exception {
- args: "run eval_context_throw_dom_exception.js",
- output: "eval_context_throw_dom_exception.js.out",
+ args: "run run/eval_context_throw_dom_exception.js",
+ output: "run/eval_context_throw_dom_exception.js.out",
});
/// Regression test for https://github.com/denoland/deno/issues/12740.
@@ -2459,8 +2455,8 @@ fn issue12807() {
}
itest!(issue_13562 {
- args: "run issue13562.ts",
- output: "issue13562.ts.out",
+ args: "run run/issue13562.ts",
+ output: "run/issue13562.ts.out",
});
itest!(import_assertions_static_import {
@@ -2497,12 +2493,12 @@ itest!(import_assertions_type_check {
});
itest!(delete_window {
- args: "run delete_window.js",
+ args: "run run/delete_window.js",
output_str: Some("true\n"),
});
itest!(colors_without_global_this {
- args: "run colors_without_globalThis.js",
+ args: "run run/colors_without_globalThis.js",
output_str: Some("true\n"),
});
@@ -2524,166 +2520,166 @@ itest!(config_not_auto_discovered_for_remote_script {
});
itest!(wasm_streaming_panic_test {
- args: "run wasm_streaming_panic_test.js",
- output: "wasm_streaming_panic_test.js.out",
+ args: "run run/wasm_streaming_panic_test.js",
+ output: "run/wasm_streaming_panic_test.js.out",
exit_code: 1,
});
// Regression test for https://github.com/denoland/deno/issues/13897.
itest!(fetch_async_error_stack {
- args: "run --quiet -A fetch_async_error_stack.ts",
- output: "fetch_async_error_stack.ts.out",
+ args: "run --quiet -A run/fetch_async_error_stack.ts",
+ output: "run/fetch_async_error_stack.ts.out",
exit_code: 1,
});
itest!(unstable_ffi_1 {
- args: "run unstable_ffi_1.js",
- output: "unstable_ffi_1.js.out",
+ args: "run run/ffi/unstable_ffi_1.js",
+ output: "run/ffi/unstable_ffi_1.js.out",
exit_code: 70,
});
itest!(unstable_ffi_2 {
- args: "run unstable_ffi_2.js",
- output: "unstable_ffi_2.js.out",
+ args: "run run/ffi/unstable_ffi_2.js",
+ output: "run/ffi/unstable_ffi_2.js.out",
exit_code: 70,
});
itest!(unstable_ffi_3 {
- args: "run unstable_ffi_3.js",
- output: "unstable_ffi_3.js.out",
+ args: "run run/ffi/unstable_ffi_3.js",
+ output: "run/ffi/unstable_ffi_3.js.out",
exit_code: 70,
});
itest!(unstable_ffi_4 {
- args: "run unstable_ffi_4.js",
- output: "unstable_ffi_4.js.out",
+ args: "run run/ffi/unstable_ffi_4.js",
+ output: "run/ffi/unstable_ffi_4.js.out",
exit_code: 70,
});
itest!(unstable_ffi_5 {
- args: "run unstable_ffi_5.js",
- output: "unstable_ffi_5.js.out",
+ args: "run run/ffi/unstable_ffi_5.js",
+ output: "run/ffi/unstable_ffi_5.js.out",
exit_code: 70,
});
itest!(unstable_ffi_6 {
- args: "run unstable_ffi_6.js",
- output: "unstable_ffi_6.js.out",
+ args: "run run/ffi/unstable_ffi_6.js",
+ output: "run/ffi/unstable_ffi_6.js.out",
exit_code: 70,
});
itest!(unstable_ffi_7 {
- args: "run unstable_ffi_7.js",
- output: "unstable_ffi_7.js.out",
+ args: "run run/ffi/unstable_ffi_7.js",
+ output: "run/ffi/unstable_ffi_7.js.out",
exit_code: 70,
});
itest!(unstable_ffi_8 {
- args: "run unstable_ffi_8.js",
- output: "unstable_ffi_8.js.out",
+ args: "run run/ffi/unstable_ffi_8.js",
+ output: "run/ffi/unstable_ffi_8.js.out",
exit_code: 70,
});
itest!(unstable_ffi_9 {
- args: "run unstable_ffi_9.js",
- output: "unstable_ffi_9.js.out",
+ args: "run run/ffi/unstable_ffi_9.js",
+ output: "run/ffi/unstable_ffi_9.js.out",
exit_code: 70,
});
itest!(unstable_ffi_10 {
- args: "run unstable_ffi_10.js",
- output: "unstable_ffi_10.js.out",
+ args: "run run/ffi/unstable_ffi_10.js",
+ output: "run/ffi/unstable_ffi_10.js.out",
exit_code: 70,
});
itest!(unstable_ffi_11 {
- args: "run unstable_ffi_11.js",
- output: "unstable_ffi_11.js.out",
+ args: "run run/ffi/unstable_ffi_11.js",
+ output: "run/ffi/unstable_ffi_11.js.out",
exit_code: 70,
});
itest!(unstable_ffi_12 {
- args: "run unstable_ffi_12.js",
- output: "unstable_ffi_12.js.out",
+ args: "run run/ffi/unstable_ffi_12.js",
+ output: "run/ffi/unstable_ffi_12.js.out",
exit_code: 70,
});
itest!(unstable_ffi_13 {
- args: "run unstable_ffi_13.js",
- output: "unstable_ffi_13.js.out",
+ args: "run run/ffi/unstable_ffi_13.js",
+ output: "run/ffi/unstable_ffi_13.js.out",
exit_code: 70,
});
itest!(unstable_ffi_14 {
- args: "run unstable_ffi_14.js",
- output: "unstable_ffi_14.js.out",
+ args: "run run/ffi/unstable_ffi_14.js",
+ output: "run/ffi/unstable_ffi_14.js.out",
exit_code: 70,
});
itest!(unstable_ffi_15 {
- args: "run unstable_ffi_15.js",
- output: "unstable_ffi_15.js.out",
+ args: "run run/ffi/unstable_ffi_15.js",
+ output: "run/ffi/unstable_ffi_15.js.out",
exit_code: 70,
});
itest!(future_check2 {
- args: "run --check future_check.ts",
- output: "future_check2.out",
+ args: "run --check run/future_check.ts",
+ output: "run/future_check2.out",
});
itest!(event_listener_error {
- args: "run --quiet event_listener_error.ts",
- output: "event_listener_error.ts.out",
+ args: "run --quiet run/event_listener_error.ts",
+ output: "run/event_listener_error.ts.out",
exit_code: 1,
});
itest!(event_listener_error_handled {
- args: "run --quiet event_listener_error_handled.ts",
- output: "event_listener_error_handled.ts.out",
+ args: "run --quiet run/event_listener_error_handled.ts",
+ output: "run/event_listener_error_handled.ts.out",
});
// https://github.com/denoland/deno/pull/14159#issuecomment-1092285446
itest!(event_listener_error_immediate_exit {
- args: "run --quiet event_listener_error_immediate_exit.ts",
- output: "event_listener_error_immediate_exit.ts.out",
+ args: "run --quiet run/event_listener_error_immediate_exit.ts",
+ output: "run/event_listener_error_immediate_exit.ts.out",
exit_code: 1,
});
// https://github.com/denoland/deno/pull/14159#issuecomment-1092285446
itest!(event_listener_error_immediate_exit_worker {
args:
- "run --quiet --unstable -A event_listener_error_immediate_exit_worker.ts",
- output: "event_listener_error_immediate_exit_worker.ts.out",
+ "run --quiet --unstable -A run/event_listener_error_immediate_exit_worker.ts",
+ output: "run/event_listener_error_immediate_exit_worker.ts.out",
exit_code: 1,
});
itest!(set_timeout_error {
- args: "run --quiet set_timeout_error.ts",
- output: "set_timeout_error.ts.out",
+ args: "run --quiet run/set_timeout_error.ts",
+ output: "run/set_timeout_error.ts.out",
exit_code: 1,
});
itest!(set_timeout_error_handled {
- args: "run --quiet set_timeout_error_handled.ts",
- output: "set_timeout_error_handled.ts.out",
+ args: "run --quiet run/set_timeout_error_handled.ts",
+ output: "run/set_timeout_error_handled.ts.out",
});
itest!(aggregate_error {
- args: "run --quiet aggregate_error.ts",
- output: "aggregate_error.out",
+ args: "run --quiet run/aggregate_error.ts",
+ output: "run/aggregate_error.out",
exit_code: 1,
});
itest!(complex_error {
- args: "run --quiet complex_error.ts",
- output: "complex_error.ts.out",
+ args: "run --quiet run/complex_error.ts",
+ output: "run/complex_error.ts.out",
exit_code: 1,
});
// Regression test for https://github.com/denoland/deno/issues/12143.
itest!(js_root_with_ts_check {
- args: "run --quiet --check js_root_with_ts_check.js",
- output: "js_root_with_ts_check.js.out",
+ args: "run --quiet --check run/js_root_with_ts_check.js",
+ output: "run/js_root_with_ts_check.js.out",
exit_code: 1,
});
@@ -2719,13 +2715,13 @@ fn check_local_then_remote() {
// Regression test for https://github.com/denoland/deno/issues/15163
itest!(check_js_points_to_ts {
- args: "run --quiet --check --config checkjs.tsconfig.json run/check_js_points_to_ts/test.js",
+ args: "run --quiet --check --config run/checkjs.tsconfig.json run/check_js_points_to_ts/test.js",
output: "run/check_js_points_to_ts/test.js.out",
exit_code: 1,
});
itest!(no_prompt_flag {
- args: "run --quiet --unstable --no-prompt no_prompt.ts",
+ args: "run --quiet --unstable --no-prompt run/no_prompt.ts",
output_str: Some(""),
});
@@ -2735,7 +2731,7 @@ fn deno_no_prompt_environment_variable() {
.current_dir(util::testdata_path())
.arg("run")
.arg("--unstable")
- .arg("no_prompt.ts")
+ .arg("run/no_prompt.ts")
.env("DENO_NO_PROMPT", "1")
.spawn()
.unwrap()
@@ -2745,53 +2741,53 @@ fn deno_no_prompt_environment_variable() {
}
itest!(report_error {
- args: "run --quiet report_error.ts",
- output: "report_error.ts.out",
+ args: "run --quiet run/report_error.ts",
+ output: "run/report_error.ts.out",
exit_code: 1,
});
itest!(report_error_handled {
- args: "run --quiet report_error_handled.ts",
- output: "report_error_handled.ts.out",
+ args: "run --quiet run/report_error_handled.ts",
+ output: "run/report_error_handled.ts.out",
});
// Regression test for https://github.com/denoland/deno/issues/15513.
itest!(report_error_end_of_program {
- args: "run --quiet report_error_end_of_program.ts",
- output: "report_error_end_of_program.ts.out",
+ args: "run --quiet run/report_error_end_of_program.ts",
+ output: "run/report_error_end_of_program.ts.out",
exit_code: 1,
});
itest!(queue_microtask_error {
- args: "run --quiet queue_microtask_error.ts",
- output: "queue_microtask_error.ts.out",
+ args: "run --quiet run/queue_microtask_error.ts",
+ output: "run/queue_microtask_error.ts.out",
exit_code: 1,
});
itest!(queue_microtask_error_handled {
- args: "run --quiet queue_microtask_error_handled.ts",
- output: "queue_microtask_error_handled.ts.out",
+ args: "run --quiet run/queue_microtask_error_handled.ts",
+ output: "run/queue_microtask_error_handled.ts.out",
});
itest!(spawn_stdout_inherit {
- args: "run --quiet --unstable -A spawn_stdout_inherit.ts",
- output: "spawn_stdout_inherit.ts.out",
+ args: "run --quiet --unstable -A run/spawn_stdout_inherit.ts",
+ output: "run/spawn_stdout_inherit.ts.out",
});
itest!(error_name_non_string {
- args: "run --quiet error_name_non_string.js",
- output: "error_name_non_string.js.out",
+ args: "run --quiet run/error_name_non_string.js",
+ output: "run/error_name_non_string.js.out",
exit_code: 1,
});
itest!(custom_inspect_url {
- args: "run custom_inspect_url.js",
- output: "custom_inspect_url.js.out",
+ args: "run run/custom_inspect_url.js",
+ output: "run/custom_inspect_url.js.out",
});
itest!(config_json_import {
- args: "run --quiet -c jsx/deno-jsx.json config_json_import.ts",
- output: "config_json_import.ts.out",
+ args: "run --quiet -c jsx/deno-jsx.json run/config_json_import.ts",
+ output: "run/config_json_import.ts.out",
http_server: true,
});
@@ -2815,39 +2811,732 @@ fn running_declaration_files() {
}
itest!(test_and_bench_are_noops_in_run {
- args: "run test_and_bench_in_run.js",
+ args: "run run/test_and_bench_in_run.js",
output_str: Some(""),
});
itest!(followup_dyn_import_resolved {
- args: "run --unstable --allow-read followup_dyn_import_resolves/main.ts",
- output: "followup_dyn_import_resolves/main.ts.out",
+ args: "run --unstable --allow-read run/followup_dyn_import_resolves/main.ts",
+ output: "run/followup_dyn_import_resolves/main.ts.out",
});
itest!(unhandled_rejection {
- args: "run --check unhandled_rejection.ts",
- output: "unhandled_rejection.ts.out",
+ args: "run --check run/unhandled_rejection.ts",
+ output: "run/unhandled_rejection.ts.out",
});
itest!(unhandled_rejection_sync_error {
- args: "run --check unhandled_rejection_sync_error.ts",
- output: "unhandled_rejection_sync_error.ts.out",
+ args: "run --check run/unhandled_rejection_sync_error.ts",
+ output: "run/unhandled_rejection_sync_error.ts.out",
});
itest!(nested_error {
- args: "run nested_error.ts",
- output: "nested_error.ts.out",
+ args: "run run/nested_error.ts",
+ output: "run/nested_error.ts.out",
exit_code: 1,
});
itest!(node_env_var_allowlist_with_unstable_flag {
- args: "run --unstable --no-prompt node_env_var_allowlist.ts",
- output: "node_env_var_allowlist_with_unstable_flag.ts.out",
+ args: "run --unstable --no-prompt run/node_env_var_allowlist.ts",
+ output: "run/node_env_var_allowlist_with_unstable_flag.ts.out",
exit_code: 1,
});
itest!(node_env_var_allowlist_without_unstable_flag {
- args: "run --no-prompt node_env_var_allowlist.ts",
- output: "node_env_var_allowlist_without_unstable_flag.ts.out",
+ args: "run --no-prompt run/node_env_var_allowlist.ts",
+ output: "run/node_env_var_allowlist_without_unstable_flag.ts.out",
exit_code: 1,
});
+
+#[test]
+fn cache_test() {
+ let _g = util::http_server();
+ let deno_dir = TempDir::new();
+ let module_url =
+ url::Url::parse("http://localhost:4545/run/006_url_imports.ts").unwrap();
+ let output = Command::new(util::deno_exe_path())
+ .env("DENO_DIR", deno_dir.path())
+ .current_dir(util::testdata_path())
+ .arg("cache")
+ .arg("--check=all")
+ .arg("-L")
+ .arg("debug")
+ .arg(module_url.to_string())
+ .output()
+ .expect("Failed to spawn script");
+ assert!(output.status.success());
+
+ let prg = util::deno_exe_path();
+ let output = Command::new(&prg)
+ .env("DENO_DIR", deno_dir.path())
+ .env("HTTP_PROXY", "http://nil")
+ .env("NO_COLOR", "1")
+ .current_dir(util::testdata_path())
+ .arg("run")
+ .arg(module_url.to_string())
+ .output()
+ .expect("Failed to spawn script");
+
+ let str_output = std::str::from_utf8(&output.stdout).unwrap();
+
+ let module_output_path =
+ util::testdata_path().join("run/006_url_imports.ts.out");
+ let mut module_output = String::new();
+ let mut module_output_file = std::fs::File::open(module_output_path).unwrap();
+ module_output_file
+ .read_to_string(&mut module_output)
+ .unwrap();
+
+ assert_eq!(module_output, str_output);
+}
+
+#[test]
+fn cache_invalidation_test() {
+ let deno_dir = TempDir::new();
+ let fixture_path = deno_dir.path().join("fixture.ts");
+ {
+ let mut file = std::fs::File::create(fixture_path.clone())
+ .expect("could not create fixture");
+ file
+ .write_all(b"console.log(\"42\");")
+ .expect("could not write fixture");
+ }
+ let output = Command::new(util::deno_exe_path())
+ .env("DENO_DIR", deno_dir.path())
+ .current_dir(util::testdata_path())
+ .arg("run")
+ .arg(fixture_path.to_str().unwrap())
+ .output()
+ .expect("Failed to spawn script");
+ assert!(output.status.success());
+ let actual = std::str::from_utf8(&output.stdout).unwrap();
+ assert_eq!(actual, "42\n");
+ {
+ let mut file = std::fs::File::create(fixture_path.clone())
+ .expect("could not create fixture");
+ file
+ .write_all(b"console.log(\"43\");")
+ .expect("could not write fixture");
+ }
+ let output = Command::new(util::deno_exe_path())
+ .env("DENO_DIR", deno_dir.path())
+ .current_dir(util::testdata_path())
+ .arg("run")
+ .arg(fixture_path.to_str().unwrap())
+ .output()
+ .expect("Failed to spawn script");
+ assert!(output.status.success());
+ let actual = std::str::from_utf8(&output.stdout).unwrap();
+ assert_eq!(actual, "43\n");
+}
+
+#[test]
+fn cache_invalidation_test_no_check() {
+ let deno_dir = TempDir::new();
+ let fixture_path = deno_dir.path().join("fixture.ts");
+ {
+ let mut file = std::fs::File::create(fixture_path.clone())
+ .expect("could not create fixture");
+ file
+ .write_all(b"console.log(\"42\");")
+ .expect("could not write fixture");
+ }
+ let output = Command::new(util::deno_exe_path())
+ .env("DENO_DIR", deno_dir.path())
+ .current_dir(util::testdata_path())
+ .arg("run")
+ .arg("--no-check")
+ .arg(fixture_path.to_str().unwrap())
+ .output()
+ .expect("Failed to spawn script");
+ assert!(output.status.success());
+ let actual = std::str::from_utf8(&output.stdout).unwrap();
+ assert_eq!(actual, "42\n");
+ {
+ let mut file = std::fs::File::create(fixture_path.clone())
+ .expect("could not create fixture");
+ file
+ .write_all(b"console.log(\"43\");")
+ .expect("could not write fixture");
+ }
+ let output = Command::new(util::deno_exe_path())
+ .env("DENO_DIR", deno_dir.path())
+ .current_dir(util::testdata_path())
+ .arg("run")
+ .arg("--no-check")
+ .arg(fixture_path.to_str().unwrap())
+ .output()
+ .expect("Failed to spawn script");
+ assert!(output.status.success());
+ let actual = std::str::from_utf8(&output.stdout).unwrap();
+ assert_eq!(actual, "43\n");
+}
+
+#[test]
+fn ts_dependency_recompilation() {
+ let t = TempDir::new();
+ let ats = t.path().join("a.ts");
+
+ std::fs::write(
+ &ats,
+ "
+ import { foo } from \"./b.ts\";
+
+ function print(str: string): void {
+ console.log(str);
+ }
+
+ print(foo);",
+ )
+ .unwrap();
+
+ let bts = t.path().join("b.ts");
+ std::fs::write(
+ &bts,
+ "
+ export const foo = \"foo\";",
+ )
+ .unwrap();
+
+ let output = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .env("NO_COLOR", "1")
+ .arg("run")
+ .arg("--check")
+ .arg(&ats)
+ .output()
+ .expect("failed to spawn script");
+
+ let stdout_output = std::str::from_utf8(&output.stdout).unwrap().trim();
+ let stderr_output = std::str::from_utf8(&output.stderr).unwrap().trim();
+
+ assert!(stdout_output.ends_with("foo"));
+ assert!(stderr_output.starts_with("Check"));
+
+ // Overwrite contents of b.ts and run again
+ std::fs::write(
+ &bts,
+ "
+ export const foo = 5;",
+ )
+ .expect("error writing file");
+
+ let output = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .env("NO_COLOR", "1")
+ .arg("run")
+ .arg("--check")
+ .arg(&ats)
+ .output()
+ .expect("failed to spawn script");
+
+ let stdout_output = std::str::from_utf8(&output.stdout).unwrap().trim();
+ let stderr_output = std::str::from_utf8(&output.stderr).unwrap().trim();
+
+ // error: TS2345 [ERROR]: Argument of type '5' is not assignable to parameter of type 'string'.
+ assert!(stderr_output.contains("TS2345"));
+ assert!(!output.status.success());
+ assert!(stdout_output.is_empty());
+}
+
+#[test]
+fn basic_auth_tokens() {
+ let _g = util::http_server();
+
+ let output = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("run")
+ .arg("http://127.0.0.1:4554/run/001_hello.js")
+ .stdout(std::process::Stdio::piped())
+ .stderr(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+
+ assert!(!output.status.success());
+
+ let stdout_str = std::str::from_utf8(&output.stdout).unwrap().trim();
+ assert!(stdout_str.is_empty());
+
+ let stderr_str = std::str::from_utf8(&output.stderr).unwrap().trim();
+ eprintln!("{}", stderr_str);
+
+ assert!(stderr_str
+ .contains("Module not found \"http://127.0.0.1:4554/run/001_hello.js\"."));
+
+ let output = util::deno_cmd()
+ .current_dir(util::root_path())
+ .arg("run")
+ .arg("http://127.0.0.1:4554/run/001_hello.js")
+ .env("DENO_AUTH_TOKENS", "testuser123:testpassabc@127.0.0.1:4554")
+ .stdout(std::process::Stdio::piped())
+ .stderr(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+
+ let stderr_str = std::str::from_utf8(&output.stderr).unwrap().trim();
+ eprintln!("{}", stderr_str);
+
+ assert!(output.status.success());
+
+ let stdout_str = std::str::from_utf8(&output.stdout).unwrap().trim();
+ assert_eq!(util::strip_ansi_codes(stdout_str), "Hello World");
+}
+
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn test_resolve_dns() {
+ use std::net::SocketAddr;
+ use std::str::FromStr;
+ use std::sync::Arc;
+ use std::time::Duration;
+ use tokio::net::TcpListener;
+ use tokio::net::UdpSocket;
+ use tokio::sync::oneshot;
+ use trust_dns_server::authority::Catalog;
+ use trust_dns_server::authority::ZoneType;
+ use trust_dns_server::proto::rr::Name;
+ use trust_dns_server::store::in_memory::InMemoryAuthority;
+ use trust_dns_server::ServerFuture;
+
+ const DNS_PORT: u16 = 4553;
+
+ // Setup DNS server for testing
+ async fn run_dns_server(tx: oneshot::Sender<()>) {
+ let zone_file = std::fs::read_to_string(
+ util::testdata_path().join("run/resolve_dns.zone.in"),
+ )
+ .unwrap();
+ let lexer = Lexer::new(&zone_file);
+ let records = Parser::new().parse(
+ lexer,
+ Some(Name::from_str("example.com").unwrap()),
+ None,
+ );
+ if records.is_err() {
+ panic!("failed to parse: {:?}", records.err())
+ }
+ let (origin, records) = records.unwrap();
+ let authority = Box::new(Arc::new(
+ InMemoryAuthority::new(origin, records, ZoneType::Primary, false)
+ .unwrap(),
+ ));
+ let mut catalog: Catalog = Catalog::new();
+ catalog.upsert(Name::root().into(), authority);
+
+ let mut server_fut = ServerFuture::new(catalog);
+ let socket_addr = SocketAddr::from(([127, 0, 0, 1], DNS_PORT));
+ let tcp_listener = TcpListener::bind(socket_addr).await.unwrap();
+ let udp_socket = UdpSocket::bind(socket_addr).await.unwrap();
+ server_fut.register_socket(udp_socket);
+ server_fut.register_listener(tcp_listener, Duration::from_secs(2));
+
+ // Notifies that the DNS server is ready
+ tx.send(()).unwrap();
+
+ server_fut.block_until_done().await.unwrap();
+ }
+
+ let (ready_tx, ready_rx) = oneshot::channel();
+ let dns_server_fut = run_dns_server(ready_tx);
+ let handle = tokio::spawn(dns_server_fut);
+
+ // Waits for the DNS server to be ready
+ ready_rx.await.unwrap();
+
+ // Pass: `--allow-net`
+ {
+ let output = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .env("NO_COLOR", "1")
+ .arg("run")
+ .arg("--check")
+ .arg("--allow-net")
+ .arg("run/resolve_dns.ts")
+ .stdout(std::process::Stdio::piped())
+ .stderr(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+ let err = String::from_utf8_lossy(&output.stderr);
+ let out = String::from_utf8_lossy(&output.stdout);
+ println!("{}", err);
+ assert!(output.status.success());
+ assert!(err.starts_with("Check file"));
+
+ let expected = std::fs::read_to_string(
+ util::testdata_path().join("run/resolve_dns.ts.out"),
+ )
+ .unwrap();
+ assert_eq!(expected, out);
+ }
+
+ // Pass: `--allow-net=127.0.0.1:4553`
+ {
+ let output = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .env("NO_COLOR", "1")
+ .arg("run")
+ .arg("--check")
+ .arg("--allow-net=127.0.0.1:4553")
+ .arg("run/resolve_dns.ts")
+ .stdout(std::process::Stdio::piped())
+ .stderr(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+ let err = String::from_utf8_lossy(&output.stderr);
+ let out = String::from_utf8_lossy(&output.stdout);
+ assert!(output.status.success());
+ assert!(err.starts_with("Check file"));
+
+ let expected = std::fs::read_to_string(
+ util::testdata_path().join("run/resolve_dns.ts.out"),
+ )
+ .unwrap();
+ assert_eq!(expected, out);
+ }
+
+ // Permission error: `--allow-net=deno.land`
+ {
+ let output = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .env("NO_COLOR", "1")
+ .arg("run")
+ .arg("--check")
+ .arg("--allow-net=deno.land")
+ .arg("run/resolve_dns.ts")
+ .stdout(std::process::Stdio::piped())
+ .stderr(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+ let err = String::from_utf8_lossy(&output.stderr);
+ let out = String::from_utf8_lossy(&output.stdout);
+ assert!(!output.status.success());
+ assert!(err.starts_with("Check file"));
+ assert!(err.contains(r#"error: Uncaught PermissionDenied: Requires net access to "127.0.0.1:4553""#));
+ assert!(out.is_empty());
+ }
+
+ // Permission error: no permission specified
+ {
+ let output = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .env("NO_COLOR", "1")
+ .arg("run")
+ .arg("--check")
+ .arg("run/resolve_dns.ts")
+ .stdout(std::process::Stdio::piped())
+ .stderr(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+ let err = String::from_utf8_lossy(&output.stderr);
+ let out = String::from_utf8_lossy(&output.stdout);
+ assert!(!output.status.success());
+ assert!(err.starts_with("Check file"));
+ assert!(err.contains(r#"error: Uncaught PermissionDenied: Requires net access to "127.0.0.1:4553""#));
+ assert!(out.is_empty());
+ }
+
+ handle.abort();
+}
+
+#[tokio::test]
+async fn http2_request_url() {
+ // TLS streams require the presence of an ambient local task set to gracefully
+ // close dropped connections in the background.
+ LocalSet::new()
+ .run_until(async {
+ let mut child = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .arg("run")
+ .arg("--unstable")
+ .arg("--quiet")
+ .arg("--allow-net")
+ .arg("--allow-read")
+ .arg("./run/http2_request_url.ts")
+ .arg("4506")
+ .stdout(std::process::Stdio::piped())
+ .spawn()
+ .unwrap();
+ let stdout = child.stdout.as_mut().unwrap();
+ let mut buffer = [0; 5];
+ let read = stdout.read(&mut buffer).unwrap();
+ assert_eq!(read, 5);
+ let msg = std::str::from_utf8(&buffer).unwrap();
+ assert_eq!(msg, "READY");
+
+ let cert = reqwest::Certificate::from_pem(include_bytes!(
+ "../testdata/tls/RootCA.crt"
+ ))
+ .unwrap();
+
+ let client = reqwest::Client::builder()
+ .add_root_certificate(cert)
+ .http2_prior_knowledge()
+ .build()
+ .unwrap();
+
+ let res = client.get("http://127.0.0.1:4506").send().await.unwrap();
+ assert_eq!(200, res.status());
+
+ let body = res.text().await.unwrap();
+ assert_eq!(body, "http://127.0.0.1:4506/");
+
+ child.kill().unwrap();
+ child.wait().unwrap();
+ })
+ .await;
+}
+
+#[cfg(not(windows))]
+#[test]
+fn set_raw_should_not_panic_on_no_tty() {
+ let output = util::deno_cmd()
+ .arg("eval")
+ .arg("--unstable")
+ .arg("Deno.setRaw(Deno.stdin.rid, true)")
+ // stdin set to piped so it certainly does not refer to TTY
+ .stdin(std::process::Stdio::piped())
+ // stderr is piped so we can capture output.
+ .stderr(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+ assert!(!output.status.success());
+ let stderr = std::str::from_utf8(&output.stderr).unwrap().trim();
+ assert!(stderr.contains("BadResource"));
+}
+
+#[test]
+fn timeout_clear() {
+ // https://github.com/denoland/deno/issues/7599
+
+ use std::time::Duration;
+ use std::time::Instant;
+
+ let source_code = r#"
+const handle = setTimeout(() => {
+ console.log("timeout finish");
+}, 10000);
+clearTimeout(handle);
+console.log("finish");
+"#;
+
+ let mut p = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .arg("run")
+ .arg("-")
+ .stdin(std::process::Stdio::piped())
+ .spawn()
+ .unwrap();
+ let stdin = p.stdin.as_mut().unwrap();
+ stdin.write_all(source_code.as_bytes()).unwrap();
+ let start = Instant::now();
+ let status = p.wait().unwrap();
+ let end = Instant::now();
+ assert!(status.success());
+ // check that program did not run for 10 seconds
+ // for timeout to clear
+ assert!(end - start < Duration::new(10, 0));
+}
+
+#[test]
+fn broken_stdout() {
+ let (reader, writer) = os_pipe::pipe().unwrap();
+ // drop the reader to create a broken pipe
+ drop(reader);
+
+ let output = util::deno_cmd()
+ .current_dir(util::testdata_path())
+ .arg("eval")
+ .arg("console.log(3.14)")
+ .stdout(writer)
+ .stderr(std::process::Stdio::piped())
+ .spawn()
+ .unwrap()
+ .wait_with_output()
+ .unwrap();
+
+ assert!(!output.status.success());
+ let stderr = std::str::from_utf8(output.stderr.as_ref()).unwrap().trim();
+ assert!(stderr.contains("Uncaught BrokenPipe"));
+ assert!(!stderr.contains("panic"));
+}
+
+itest!(error_cause {
+ args: "run run/error_cause.ts",
+ output: "run/error_cause.ts.out",
+ exit_code: 1,
+});
+
+itest!(error_cause_recursive {
+ args: "run run/error_cause_recursive.ts",
+ output: "run/error_cause_recursive.ts.out",
+ exit_code: 1,
+});
+
+#[test]
+fn websocket() {
+ let _g = util::http_server();
+
+ let script = util::testdata_path().join("run/websocket_test.ts");
+ let root_ca = util::testdata_path().join("tls/RootCA.pem");
+ let status = util::deno_cmd()
+ .arg("test")
+ .arg("--unstable")
+ .arg("--allow-net")
+ .arg("--cert")
+ .arg(root_ca)
+ .arg(script)
+ .spawn()
+ .unwrap()
+ .wait()
+ .unwrap();
+
+ assert!(status.success());
+}
+
+#[test]
+fn websocketstream() {
+ let _g = util::http_server();
+
+ let script = util::testdata_path().join("run/websocketstream_test.ts");
+ let root_ca = util::testdata_path().join("tls/RootCA.pem");
+ let status = util::deno_cmd()
+ .arg("test")
+ .arg("--unstable")
+ .arg("--allow-net")
+ .arg("--cert")
+ .arg(root_ca)
+ .arg(script)
+ .spawn()
+ .unwrap()
+ .wait()
+ .unwrap();
+
+ assert!(status.success());
+}
+
+#[test]
+fn websocketstream_ping() {
+ use deno_runtime::deno_websocket::tokio_tungstenite::tungstenite;
+ let _g = util::http_server();
+
+ let script = util::testdata_path().join("run/websocketstream_ping_test.ts");
+ let root_ca = util::testdata_path().join("tls/RootCA.pem");
+ let mut child = util::deno_cmd()
+ .arg("test")
+ .arg("--unstable")
+ .arg("--allow-net")
+ .arg("--cert")
+ .arg(root_ca)
+ .arg(script)
+ .stdout(std::process::Stdio::piped())
+ .spawn()
+ .unwrap();
+
+ let server = std::net::TcpListener::bind("127.0.0.1:4513").unwrap();
+ let (stream, _) = server.accept().unwrap();
+ let mut socket = tungstenite::accept(stream).unwrap();
+ socket
+ .write_message(tungstenite::Message::Text(String::from("A")))
+ .unwrap();
+ socket
+ .write_message(tungstenite::Message::Ping(vec![]))
+ .unwrap();
+ socket
+ .write_message(tungstenite::Message::Text(String::from("B")))
+ .unwrap();
+ let message = socket.read_message().unwrap();
+ assert_eq!(message, tungstenite::Message::Pong(vec![]));
+ socket
+ .write_message(tungstenite::Message::Text(String::from("C")))
+ .unwrap();
+ socket.close(None).unwrap();
+
+ assert!(child.wait().unwrap().success());
+}
+
+#[test]
+fn websocket_server_multi_field_connection_header() {
+ let script = util::testdata_path()
+ .join("run/websocket_server_multi_field_connection_header_test.ts");
+ let root_ca = util::testdata_path().join("tls/RootCA.pem");
+ let mut child = util::deno_cmd()
+ .arg("run")
+ .arg("--unstable")
+ .arg("--allow-net")
+ .arg("--cert")
+ .arg(root_ca)
+ .arg(script)
+ .stdout(std::process::Stdio::piped())
+ .spawn()
+ .unwrap();
+
+ let stdout = child.stdout.as_mut().unwrap();
+ let mut buffer = [0; 5];
+ let read = stdout.read(&mut buffer).unwrap();
+ assert_eq!(read, 5);
+ let msg = std::str::from_utf8(&buffer).unwrap();
+ assert_eq!(msg, "READY");
+
+ let req = http::request::Builder::new()
+ .header(http::header::CONNECTION, "keep-alive, Upgrade")
+ .uri("ws://localhost:4319")
+ .body(())
+ .unwrap();
+ let (mut socket, _) =
+ deno_runtime::deno_websocket::tokio_tungstenite::tungstenite::connect(req)
+ .unwrap();
+ let message = socket.read_message().unwrap();
+ assert_eq!(message, deno_runtime::deno_websocket::tokio_tungstenite::tungstenite::Message::Close(None));
+ socket.close(None).unwrap();
+ assert!(child.wait().unwrap().success());
+}
+
+// TODO(bartlomieju): this should use `deno run`, not `deno test`; but the
+// test hangs then. https://github.com/denoland/deno/issues/14283
+#[test]
+#[ignore]
+fn websocket_server_idletimeout() {
+ let script =
+ util::testdata_path().join("run/websocket_server_idletimeout.ts");
+ let root_ca = util::testdata_path().join("tls/RootCA.pem");
+ let mut child = util::deno_cmd()
+ .arg("test")
+ .arg("--unstable")
+ .arg("--allow-net")
+ .arg("--cert")
+ .arg(root_ca)
+ .arg(script)
+ .stdout(std::process::Stdio::piped())
+ .spawn()
+ .unwrap();
+
+ let stdout = child.stdout.as_mut().unwrap();
+ let mut buffer = [0; 5];
+ let read = stdout.read(&mut buffer).unwrap();
+ assert_eq!(read, 5);
+ let msg = std::str::from_utf8(&buffer).unwrap();
+ assert_eq!(msg, "READY");
+
+ let req = http::request::Builder::new()
+ .uri("ws://localhost:4509")
+ .body(())
+ .unwrap();
+ let (_ws, _request) =
+ deno_runtime::deno_websocket::tokio_tungstenite::tungstenite::connect(req)
+ .unwrap();
+
+ assert!(child.wait().unwrap().success());
+}
diff --git a/cli/tests/integration/vendor_tests.rs b/cli/tests/integration/vendor_tests.rs
index 54809dacf..b3a3f441f 100644
--- a/cli/tests/integration/vendor_tests.rs
+++ b/cli/tests/integration/vendor_tests.rs
@@ -347,6 +347,7 @@ fn existing_import_map_mixed_with_remote() {
.arg("--output")
.arg("vendor2")
.stderr(Stdio::piped())
+ .stdout(Stdio::piped())
.spawn()
.unwrap();
let output = deno.wait_with_output().unwrap();
diff --git a/cli/tests/integration/watcher_tests.rs b/cli/tests/integration/watcher_tests.rs
index b69379427..efc1b186b 100644
--- a/cli/tests/integration/watcher_tests.rs
+++ b/cli/tests/integration/watcher_tests.rs
@@ -242,15 +242,15 @@ fn lint_all_files_on_each_change_test() {
#[test]
fn fmt_watch_test() {
+ let fmt_testdata_path = util::testdata_path().join("fmt");
let t = TempDir::new();
- let fixed = util::testdata_path().join("badly_formatted_fixed.js");
- let badly_formatted_original =
- util::testdata_path().join("badly_formatted.mjs");
+ let fixed = fmt_testdata_path.join("badly_formatted_fixed.js");
+ let badly_formatted_original = fmt_testdata_path.join("badly_formatted.mjs");
let badly_formatted = t.path().join("badly_formatted.js");
std::fs::copy(&badly_formatted_original, &badly_formatted).unwrap();
let mut child = util::deno_cmd()
- .current_dir(util::testdata_path())
+ .current_dir(&fmt_testdata_path)
.arg("fmt")
.arg(&badly_formatted)
.arg("--watch")
@@ -291,10 +291,10 @@ fn fmt_watch_test() {
#[test]
fn fmt_watch_without_args_test() {
+ let fmt_testdata_path = util::testdata_path().join("fmt");
let t = TempDir::new();
- let fixed = util::testdata_path().join("badly_formatted_fixed.js");
- let badly_formatted_original =
- util::testdata_path().join("badly_formatted.mjs");
+ let fixed = fmt_testdata_path.join("badly_formatted_fixed.js");
+ let badly_formatted_original = fmt_testdata_path.join("badly_formatted.mjs");
let badly_formatted = t.path().join("badly_formatted.js");
std::fs::copy(&badly_formatted_original, &badly_formatted).unwrap();
@@ -339,15 +339,15 @@ fn fmt_watch_without_args_test() {
#[test]
fn fmt_check_all_files_on_each_change_test() {
let t = TempDir::new();
- let badly_formatted_original =
- util::testdata_path().join("badly_formatted.mjs");
+ let fmt_testdata_path = util::testdata_path().join("fmt");
+ let badly_formatted_original = fmt_testdata_path.join("badly_formatted.mjs");
let badly_formatted_1 = t.path().join("badly_formatted_1.js");
let badly_formatted_2 = t.path().join("badly_formatted_2.js");
std::fs::copy(&badly_formatted_original, &badly_formatted_1).unwrap();
std::fs::copy(&badly_formatted_original, &badly_formatted_2).unwrap();
let mut child = util::deno_cmd()
- .current_dir(util::testdata_path())
+ .current_dir(&fmt_testdata_path)
.arg("fmt")
.arg(&t.path())
.arg("--watch")
diff --git a/cli/tests/integration/worker_tests.rs b/cli/tests/integration/worker_tests.rs
index 63d5ccbd3..b864c15da 100644
--- a/cli/tests/integration/worker_tests.rs
+++ b/cli/tests/integration/worker_tests.rs
@@ -41,20 +41,20 @@ itest!(nonexistent_worker {
});
itest!(_084_worker_custom_inspect {
- args: "run --allow-read 084_worker_custom_inspect.ts",
- output: "084_worker_custom_inspect.ts.out",
+ args: "run --allow-read workers/custom_inspect/main.ts",
+ output: "workers/custom_inspect/main.out",
});
itest!(error_worker_permissions_local {
- args: "run --reload error_worker_permissions_local.ts",
- output: "error_worker_permissions_local.ts.out",
+ args: "run --reload workers/error_worker_permissions_local.ts",
+ output: "workers/error_worker_permissions_local.ts.out",
exit_code: 1,
});
itest!(error_worker_permissions_remote {
- args: "run --reload error_worker_permissions_remote.ts",
+ args: "run --reload workers/error_worker_permissions_remote.ts",
http_server: true,
- output: "error_worker_permissions_remote.ts.out",
+ output: "workers/error_worker_permissions_remote.ts.out",
exit_code: 1,
});
diff --git a/cli/tests/testdata/003_relative_import.ts b/cli/tests/testdata/003_relative_import.ts
deleted file mode 100644
index 01d5d7faa..000000000
--- a/cli/tests/testdata/003_relative_import.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { printHello } from "./subdir/print_hello.ts";
-
-printHello();
diff --git a/cli/tests/testdata/014_duplicate_import.ts b/cli/tests/testdata/014_duplicate_import.ts
deleted file mode 100644
index 88f934526..000000000
--- a/cli/tests/testdata/014_duplicate_import.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-// with all the imports of the same module, the module should only be
-// instantiated once
-import "./subdir/auto_print_hello.ts";
-
-import "./subdir/auto_print_hello.ts";
-
-(async () => {
- await import("./subdir/auto_print_hello.ts");
-})();
diff --git a/cli/tests/testdata/020_json_modules.ts b/cli/tests/testdata/020_json_modules.ts
deleted file mode 100644
index fdc85c440..000000000
--- a/cli/tests/testdata/020_json_modules.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import config from "./subdir/config.json";
-console.log(JSON.stringify(config));
diff --git a/cli/tests/testdata/021_mjs_modules.ts b/cli/tests/testdata/021_mjs_modules.ts
deleted file mode 100644
index 6052b9081..000000000
--- a/cli/tests/testdata/021_mjs_modules.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { isMod5 } from "./subdir/mod5.mjs";
-console.log(isMod5);
diff --git a/cli/tests/testdata/023_no_ext b/cli/tests/testdata/023_no_ext
deleted file mode 100644
index 0dcfb6209..000000000
--- a/cli/tests/testdata/023_no_ext
+++ /dev/null
@@ -1,2 +0,0 @@
-import * as mod4 from "./subdir/mod4.js";
-console.log(mod4.isMod4);
diff --git a/cli/tests/testdata/024_import_no_ext_with_headers.ts b/cli/tests/testdata/024_import_no_ext_with_headers.ts
deleted file mode 100644
index c8621d0e6..000000000
--- a/cli/tests/testdata/024_import_no_ext_with_headers.ts
+++ /dev/null
@@ -1 +0,0 @@
-import "./023_no_ext_with_headers";
diff --git a/cli/tests/testdata/024_import_no_ext_with_headers.ts.out b/cli/tests/testdata/024_import_no_ext_with_headers.ts.out
deleted file mode 100644
index e427984d4..000000000
--- a/cli/tests/testdata/024_import_no_ext_with_headers.ts.out
+++ /dev/null
@@ -1 +0,0 @@
-HELLO
diff --git a/cli/tests/testdata/029_eval.out b/cli/tests/testdata/029_eval.out
deleted file mode 100644
index ce0136250..000000000
--- a/cli/tests/testdata/029_eval.out
+++ /dev/null
@@ -1 +0,0 @@
-hello
diff --git a/cli/tests/testdata/030_eval_ts.out b/cli/tests/testdata/030_eval_ts.out
deleted file mode 100644
index 190a18037..000000000
--- a/cli/tests/testdata/030_eval_ts.out
+++ /dev/null
@@ -1 +0,0 @@
-123
diff --git a/cli/tests/testdata/035_cached_only_flag.out b/cli/tests/testdata/035_cached_only_flag.out
deleted file mode 100644
index 10c8611fa..000000000
--- a/cli/tests/testdata/035_cached_only_flag.out
+++ /dev/null
@@ -1,4 +0,0 @@
-error: Specifier not found in cache: "http://127.0.0.1:4545/019_media_types.ts", --cached-only is specified.
-
-Caused by:
- Specifier not found in cache: "http://127.0.0.1:4545/019_media_types.ts", --cached-only is specified.
diff --git a/cli/tests/testdata/044_bad_resource.ts b/cli/tests/testdata/044_bad_resource.ts
deleted file mode 100644
index 05e1354dc..000000000
--- a/cli/tests/testdata/044_bad_resource.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-const file = await Deno.open("044_bad_resource.ts", { read: true });
-file.close();
-await file.seek(10, 0);
diff --git a/cli/tests/testdata/045_proxy_test.ts.out b/cli/tests/testdata/045_proxy_test.ts.out
deleted file mode 100644
index 4ebf97dee..000000000
--- a/cli/tests/testdata/045_proxy_test.ts.out
+++ /dev/null
@@ -1,6 +0,0 @@
-Proxy server listening on [WILDCARD]
-Proxy request to: http://localhost:4545/045_mod.ts
-Proxy request to: http://localhost:4545/045_mod.ts
-Proxy request to: http://localhost:4545/045_output.ts
-Proxy request to: http://localhost:4545/045_mod.ts
-proxy-authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
diff --git a/cli/tests/testdata/052_no_remote_flag.out b/cli/tests/testdata/052_no_remote_flag.out
deleted file mode 100644
index 712fcf3d6..000000000
--- a/cli/tests/testdata/052_no_remote_flag.out
+++ /dev/null
@@ -1,4 +0,0 @@
-error: A remote specifier was requested: "http://127.0.0.1:4545/019_media_types.ts", but --no-remote is specified.
-
-Caused by:
- A remote specifier was requested: "http://127.0.0.1:4545/019_media_types.ts", but --no-remote is specified.
diff --git a/cli/tests/testdata/053_import_compression/main.ts b/cli/tests/testdata/053_import_compression/main.ts
deleted file mode 100644
index 1ff1b0c83..000000000
--- a/cli/tests/testdata/053_import_compression/main.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import "http://127.0.0.1:4545/053_import_compression/gziped";
-import "http://127.0.0.1:4545/053_import_compression/brotli";
-
-console.log(
- await fetch(
- "http://127.0.0.1:4545/053_import_compression/gziped",
- ).then((res) => res.text()),
-);
-console.log(
- await fetch(
- "http://127.0.0.1:4545/053_import_compression/brotli",
- ).then((res) => res.text()),
-);
diff --git a/cli/tests/testdata/072_location_relative_fetch.ts b/cli/tests/testdata/072_location_relative_fetch.ts
deleted file mode 100644
index d4764bf7f..000000000
--- a/cli/tests/testdata/072_location_relative_fetch.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-const response = await fetch("fetch/hello.txt");
-console.log(await response.text());
diff --git a/cli/tests/testdata/084_worker_custom_inspect.ts b/cli/tests/testdata/084_worker_custom_inspect.ts
deleted file mode 100644
index 27e27e51f..000000000
--- a/cli/tests/testdata/084_worker_custom_inspect.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-new Worker(
- import.meta.resolve("./084_worker_custom_inspect_worker.ts"),
- { type: "module" },
-);
diff --git a/cli/tests/testdata/Component.tsx b/cli/tests/testdata/Component.tsx
deleted file mode 100644
index 81dfd6957..000000000
--- a/cli/tests/testdata/Component.tsx
+++ /dev/null
@@ -1 +0,0 @@
-import "./046_jsx_test.tsx";
diff --git a/cli/tests/testdata/DenoWinRunner.cs b/cli/tests/testdata/assets/DenoWinRunner.cs
index 2f9e9f89f..2f9e9f89f 100644
--- a/cli/tests/testdata/DenoWinRunner.cs
+++ b/cli/tests/testdata/assets/DenoWinRunner.cs
diff --git a/cli/tests/testdata/DenoWinRunner.ps1 b/cli/tests/testdata/assets/DenoWinRunner.ps1
index 203b5d36c..203b5d36c 100644
--- a/cli/tests/testdata/DenoWinRunner.ps1
+++ b/cli/tests/testdata/assets/DenoWinRunner.ps1
diff --git a/cli/tests/testdata/deno_dom_0.1.3-alpha2.wasm b/cli/tests/testdata/assets/deno_dom_0.1.3-alpha2.wasm
index 6dd9d0e91..6dd9d0e91 100644
--- a/cli/tests/testdata/deno_dom_0.1.3-alpha2.wasm
+++ b/cli/tests/testdata/assets/deno_dom_0.1.3-alpha2.wasm
Binary files differ
diff --git a/cli/tests/testdata/fixture.json b/cli/tests/testdata/assets/fixture.json
index 56e056b6a..56e056b6a 100644
--- a/cli/tests/testdata/fixture.json
+++ b/cli/tests/testdata/assets/fixture.json
diff --git a/cli/tests/testdata/hello.txt b/cli/tests/testdata/assets/hello.txt
index 6769dd60b..6769dd60b 100644
--- a/cli/tests/testdata/hello.txt
+++ b/cli/tests/testdata/assets/hello.txt
diff --git a/cli/tests/testdata/unreachable.wasm b/cli/tests/testdata/assets/unreachable.wasm
index a4110ee39..a4110ee39 100644
--- a/cli/tests/testdata/unreachable.wasm
+++ b/cli/tests/testdata/assets/unreachable.wasm
Binary files differ
diff --git a/cli/tests/testdata/response_string_perf.js b/cli/tests/testdata/benches/response_string_perf.js
index f55376c77..f55376c77 100644
--- a/cli/tests/testdata/response_string_perf.js
+++ b/cli/tests/testdata/benches/response_string_perf.js
diff --git a/cli/tests/testdata/text_decoder_perf.js b/cli/tests/testdata/benches/text_decoder_perf.js
index 2e52b1f8b..2e52b1f8b 100644
--- a/cli/tests/testdata/text_decoder_perf.js
+++ b/cli/tests/testdata/benches/text_decoder_perf.js
diff --git a/cli/tests/testdata/text_encoder_into_perf.js b/cli/tests/testdata/benches/text_encoder_into_perf.js
index 8d60e9f00..8d60e9f00 100644
--- a/cli/tests/testdata/text_encoder_into_perf.js
+++ b/cli/tests/testdata/benches/text_encoder_into_perf.js
diff --git a/cli/tests/testdata/text_encoder_perf.js b/cli/tests/testdata/benches/text_encoder_perf.js
index 6f61f019e..6f61f019e 100644
--- a/cli/tests/testdata/text_encoder_perf.js
+++ b/cli/tests/testdata/benches/text_encoder_perf.js
diff --git a/cli/tests/testdata/095_cache_with_bare_import.ts b/cli/tests/testdata/bundle/bare_imports/error_with_bare_import.ts
index c0748305d..c0748305d 100644
--- a/cli/tests/testdata/095_cache_with_bare_import.ts
+++ b/cli/tests/testdata/bundle/bare_imports/error_with_bare_import.ts
diff --git a/cli/tests/testdata/error_027_bundle_with_bare_import.ts.out b/cli/tests/testdata/bundle/bare_imports/error_with_bare_import.ts.out
index e2edd118a..44d063a5e 100644
--- a/cli/tests/testdata/error_027_bundle_with_bare_import.ts.out
+++ b/cli/tests/testdata/bundle/bare_imports/error_with_bare_import.ts.out
@@ -1,2 +1,2 @@
[WILDCARD]error: Relative import path "foo" not prefixed with / or ./ or ../
- at file:///[WILDCARD]/error_027_bundle_with_bare_import.ts:[WILDCARD]
+ at file:///[WILDCARD]/error_with_bare_import.ts:[WILDCARD]
diff --git a/cli/tests/testdata/bundle.test.out b/cli/tests/testdata/bundle/bundle.test.out
index 6b1c109d3..6b1c109d3 100644
--- a/cli/tests/testdata/bundle.test.out
+++ b/cli/tests/testdata/bundle/bundle.test.out
diff --git a/cli/tests/testdata/bundle/check_local_by_default.out b/cli/tests/testdata/bundle/check_local_by_default/no_errors.out
index c4559d1fa..c4559d1fa 100644
--- a/cli/tests/testdata/bundle/check_local_by_default.out
+++ b/cli/tests/testdata/bundle/check_local_by_default/no_errors.out
diff --git a/cli/tests/testdata/bundle/check_local_by_default.ts b/cli/tests/testdata/bundle/check_local_by_default/no_errors.ts
index 2ae8c2692..2ae8c2692 100644
--- a/cli/tests/testdata/bundle/check_local_by_default.ts
+++ b/cli/tests/testdata/bundle/check_local_by_default/no_errors.ts
diff --git a/cli/tests/testdata/bundle/check_local_by_default2.out b/cli/tests/testdata/bundle/check_local_by_default/type_error.out
index 60f5760f8..6d53e9498 100644
--- a/cli/tests/testdata/bundle/check_local_by_default2.out
+++ b/cli/tests/testdata/bundle/check_local_by_default/type_error.out
@@ -1,4 +1,4 @@
error: TS2322 [ERROR]: Type '12' is not assignable to type '"b"'.
const b: "b" = 12;
^
- at [WILDCARD]bundle/check_local_by_default2.ts:3:7
+ at [WILDCARD]bundle/check_local_by_default/type_error.ts:3:7
diff --git a/cli/tests/testdata/bundle/check_local_by_default2.ts b/cli/tests/testdata/bundle/check_local_by_default/type_error.ts
index 5177ff944..5177ff944 100644
--- a/cli/tests/testdata/bundle/check_local_by_default2.ts
+++ b/cli/tests/testdata/bundle/check_local_by_default/type_error.ts
diff --git a/cli/tests/testdata/ts_decorators_bundle.out b/cli/tests/testdata/bundle/decorators/ts_decorators.out
index 2f503fdd0..2f503fdd0 100644
--- a/cli/tests/testdata/ts_decorators_bundle.out
+++ b/cli/tests/testdata/bundle/decorators/ts_decorators.out
diff --git a/cli/tests/testdata/ts_decorators_bundle.ts b/cli/tests/testdata/bundle/decorators/ts_decorators.ts
index 72120b2ec..61299bccf 100644
--- a/cli/tests/testdata/ts_decorators_bundle.ts
+++ b/cli/tests/testdata/bundle/decorators/ts_decorators.ts
@@ -1,6 +1,6 @@
// deno-lint-ignore-file
-import { B } from "./subdir/more_decorators.ts";
+import { B } from "../../subdir/more_decorators.ts";
function Decorator() {
return function (
diff --git a/cli/tests/testdata/bundle_dynamic_import.ts b/cli/tests/testdata/bundle/dynamic_import.ts
index d8c7d08ec..d8c7d08ec 100644
--- a/cli/tests/testdata/bundle_dynamic_import.ts
+++ b/cli/tests/testdata/bundle/dynamic_import.ts
diff --git a/cli/tests/testdata/bundle_ignore_directives.test.out b/cli/tests/testdata/bundle/ignore_directives.test.out
index b69c2632c..b69c2632c 100644
--- a/cli/tests/testdata/bundle_ignore_directives.test.out
+++ b/cli/tests/testdata/bundle/ignore_directives.test.out
diff --git a/cli/tests/testdata/bundle/import_map/import_map.json b/cli/tests/testdata/bundle/import_map/import_map.json
new file mode 100644
index 000000000..c02f72718
--- /dev/null
+++ b/cli/tests/testdata/bundle/import_map/import_map.json
@@ -0,0 +1,5 @@
+{
+ "imports": {
+ "mod2": "../../subdir/subdir2/mod2.ts"
+ }
+}
diff --git a/cli/tests/testdata/bundle_im.ts b/cli/tests/testdata/bundle/import_map/main.ts
index 74834de20..74834de20 100644
--- a/cli/tests/testdata/bundle_im.ts
+++ b/cli/tests/testdata/bundle/import_map/main.ts
diff --git a/cli/tests/testdata/bundle_jsx.out b/cli/tests/testdata/bundle/jsx.out
index da83cde82..da83cde82 100644
--- a/cli/tests/testdata/bundle_jsx.out
+++ b/cli/tests/testdata/bundle/jsx.out
diff --git a/cli/tests/testdata/lock_check_err_with_bundle.json b/cli/tests/testdata/bundle/lockfile/check_error.json
index a218d7000..a218d7000 100644
--- a/cli/tests/testdata/lock_check_err_with_bundle.json
+++ b/cli/tests/testdata/bundle/lockfile/check_error.json
diff --git a/cli/tests/testdata/lock_check_err_with_bundle.out b/cli/tests/testdata/bundle/lockfile/check_error.out
index a20e9b3af..9299bc27e 100644
--- a/cli/tests/testdata/lock_check_err_with_bundle.out
+++ b/cli/tests/testdata/bundle/lockfile/check_error.out
@@ -1,4 +1,4 @@
[WILDCARD]
error: The source code is invalid, as it does not match the expected hash in the lock file.
Specifier: http://127.0.0.1:4545/subdir/subdir2/mod2.ts
- Lock file: lock_check_err_with_bundle.json
+ Lock file: bundle/lockfile/check_error.json
diff --git a/cli/tests/testdata/bundle_im.json b/cli/tests/testdata/bundle_im.json
deleted file mode 100644
index 8ebc00c5b..000000000
--- a/cli/tests/testdata/bundle_im.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "imports": {
- "mod2": "./subdir/subdir2/mod2.ts"
- }
-}
diff --git a/cli/tests/testdata/036_import_map_fetch.out b/cli/tests/testdata/cache/036_import_map_fetch.out
index e69de29bb..e69de29bb 100644
--- a/cli/tests/testdata/036_import_map_fetch.out
+++ b/cli/tests/testdata/cache/036_import_map_fetch.out
diff --git a/cli/tests/testdata/037_fetch_multiple.out b/cli/tests/testdata/cache/037_fetch_multiple.out
index 09c6c0f60..09c6c0f60 100644
--- a/cli/tests/testdata/037_fetch_multiple.out
+++ b/cli/tests/testdata/cache/037_fetch_multiple.out
diff --git a/cli/tests/testdata/error_027_bundle_with_bare_import.ts b/cli/tests/testdata/cache/095_cache_with_bare_import.ts
index c0748305d..c0748305d 100644
--- a/cli/tests/testdata/error_027_bundle_with_bare_import.ts
+++ b/cli/tests/testdata/cache/095_cache_with_bare_import.ts
diff --git a/cli/tests/testdata/095_cache_with_bare_import.ts.out b/cli/tests/testdata/cache/095_cache_with_bare_import.ts.out
index 2668a6e08..2668a6e08 100644
--- a/cli/tests/testdata/095_cache_with_bare_import.ts.out
+++ b/cli/tests/testdata/cache/095_cache_with_bare_import.ts.out
diff --git a/cli/tests/testdata/cache_extensionless.out b/cli/tests/testdata/cache/cache_extensionless.out
index 3694c67cb..3694c67cb 100644
--- a/cli/tests/testdata/cache_extensionless.out
+++ b/cli/tests/testdata/cache/cache_extensionless.out
diff --git a/cli/tests/testdata/cache_random_extension.out b/cli/tests/testdata/cache/cache_random_extension.out
index 745a2e0e3..745a2e0e3 100644
--- a/cli/tests/testdata/cache_random_extension.out
+++ b/cli/tests/testdata/cache/cache_random_extension.out
diff --git a/cli/tests/testdata/ignore_require.js b/cli/tests/testdata/cache/ignore_require.js
index a8ef15021..a8ef15021 100644
--- a/cli/tests/testdata/ignore_require.js
+++ b/cli/tests/testdata/cache/ignore_require.js
diff --git a/cli/tests/testdata/performance_stats.out b/cli/tests/testdata/cache/performance_stats.out
index 141829ee6..141829ee6 100644
--- a/cli/tests/testdata/performance_stats.out
+++ b/cli/tests/testdata/cache/performance_stats.out
diff --git a/cli/tests/testdata/redirect_cache.out b/cli/tests/testdata/cache/redirect_cache.out
index 8905c4529..8905c4529 100644
--- a/cli/tests/testdata/redirect_cache.out
+++ b/cli/tests/testdata/cache/redirect_cache.out
diff --git a/cli/tests/testdata/cafile_info.ts b/cli/tests/testdata/cert/cafile_info.ts
index b41873f73..b41873f73 100644
--- a/cli/tests/testdata/cafile_info.ts
+++ b/cli/tests/testdata/cert/cafile_info.ts
diff --git a/cli/tests/testdata/cafile_info.ts.out b/cli/tests/testdata/cert/cafile_info.ts.out
index 3ce03961d..4c7e6c6c7 100644
--- a/cli/tests/testdata/cafile_info.ts.out
+++ b/cli/tests/testdata/cert/cafile_info.ts.out
@@ -2,7 +2,7 @@ local: [WILDCARD]https[WILDCARD]localhost_PORT5545[WILDCARD]
type: TypeScript
dependencies: 8 unique (total [WILDCARD])
-https://localhost:5545/cafile_info.ts ([WILDCARD])
+https://localhost:5545/cert/cafile_info.ts ([WILDCARD])
├── https://localhost:5545/subdir/mt_application_ecmascript.j2.js ([WILDCARD])
├── https://localhost:5545/subdir/mt_application_x_javascript.j4.js ([WILDCARD])
├── https://localhost:5545/subdir/mt_application_x_typescript.t4.ts ([WILDCARD])
diff --git a/cli/tests/testdata/cafile_ts_fetch.ts b/cli/tests/testdata/cert/cafile_ts_fetch.ts
index 03afb6d2f..12fcda007 100644
--- a/cli/tests/testdata/cafile_ts_fetch.ts
+++ b/cli/tests/testdata/cert/cafile_ts_fetch.ts
@@ -1,3 +1,3 @@
-fetch("https://localhost:5545/cafile_ts_fetch.ts.out")
+fetch("https://localhost:5545/cert/cafile_ts_fetch.ts.out")
.then((r) => r.text())
.then((t) => console.log(t.trimEnd()));
diff --git a/cli/tests/testdata/cafile_ts_fetch.ts.out b/cli/tests/testdata/cert/cafile_ts_fetch.ts.out
index 699b756ed..699b756ed 100644
--- a/cli/tests/testdata/cafile_ts_fetch.ts.out
+++ b/cli/tests/testdata/cert/cafile_ts_fetch.ts.out
diff --git a/cli/tests/testdata/cafile_ts_fetch_unsafe_ssl.ts.out b/cli/tests/testdata/cert/cafile_ts_fetch_unsafe_ssl.ts.out
index a0934e584..a0934e584 100644
--- a/cli/tests/testdata/cafile_ts_fetch_unsafe_ssl.ts.out
+++ b/cli/tests/testdata/cert/cafile_ts_fetch_unsafe_ssl.ts.out
diff --git a/cli/tests/testdata/cafile_url_imports.ts b/cli/tests/testdata/cert/cafile_url_imports.ts
index 2355a8628..2355a8628 100644
--- a/cli/tests/testdata/cafile_url_imports.ts
+++ b/cli/tests/testdata/cert/cafile_url_imports.ts
diff --git a/cli/tests/testdata/cafile_url_imports.ts.out b/cli/tests/testdata/cert/cafile_url_imports.ts.out
index 989ce33e9..989ce33e9 100644
--- a/cli/tests/testdata/cafile_url_imports.ts.out
+++ b/cli/tests/testdata/cert/cafile_url_imports.ts.out
diff --git a/cli/tests/testdata/cafile_url_imports_unsafe_ssl.ts.out b/cli/tests/testdata/cert/cafile_url_imports_unsafe_ssl.ts.out
index daebcd766..daebcd766 100644
--- a/cli/tests/testdata/cafile_url_imports_unsafe_ssl.ts.out
+++ b/cli/tests/testdata/cert/cafile_url_imports_unsafe_ssl.ts.out
diff --git a/cli/tests/testdata/deno_land_unsafe_ssl.ts b/cli/tests/testdata/cert/deno_land_unsafe_ssl.ts
index f5e8dcc80..f5e8dcc80 100644
--- a/cli/tests/testdata/deno_land_unsafe_ssl.ts
+++ b/cli/tests/testdata/cert/deno_land_unsafe_ssl.ts
diff --git a/cli/tests/testdata/deno_land_unsafe_ssl.ts.out b/cli/tests/testdata/cert/deno_land_unsafe_ssl.ts.out
index cbf52b076..cbf52b076 100644
--- a/cli/tests/testdata/deno_land_unsafe_ssl.ts.out
+++ b/cli/tests/testdata/cert/deno_land_unsafe_ssl.ts.out
diff --git a/cli/tests/testdata/ip_address_unsafe_ssl.ts b/cli/tests/testdata/cert/ip_address_unsafe_ssl.ts
index a3268888f..a3268888f 100644
--- a/cli/tests/testdata/ip_address_unsafe_ssl.ts
+++ b/cli/tests/testdata/cert/ip_address_unsafe_ssl.ts
diff --git a/cli/tests/testdata/ip_address_unsafe_ssl.ts.out b/cli/tests/testdata/cert/ip_address_unsafe_ssl.ts.out
index d4ebb2617..d4ebb2617 100644
--- a/cli/tests/testdata/ip_address_unsafe_ssl.ts.out
+++ b/cli/tests/testdata/cert/ip_address_unsafe_ssl.ts.out
diff --git a/cli/tests/testdata/listen_tls_alpn.ts b/cli/tests/testdata/cert/listen_tls_alpn.ts
index b3ade686e..b3ade686e 100644
--- a/cli/tests/testdata/listen_tls_alpn.ts
+++ b/cli/tests/testdata/cert/listen_tls_alpn.ts
diff --git a/cli/tests/testdata/listen_tls_alpn_fail.ts b/cli/tests/testdata/cert/listen_tls_alpn_fail.ts
index 04f9ec11f..da60383f0 100644
--- a/cli/tests/testdata/listen_tls_alpn_fail.ts
+++ b/cli/tests/testdata/cert/listen_tls_alpn_fail.ts
@@ -1,4 +1,4 @@
-import { assertRejects } from "../../../test_util/std/testing/asserts.ts";
+import { assertRejects } from "../../../../test_util/std/testing/asserts.ts";
const listener = Deno.listenTls({
port: Number(Deno.args[0]),
diff --git a/cli/tests/testdata/localhost_unsafe_ssl.ts.out b/cli/tests/testdata/cert/localhost_unsafe_ssl.ts.out
index 0bfaeb25d..0bfaeb25d 100644
--- a/cli/tests/testdata/localhost_unsafe_ssl.ts.out
+++ b/cli/tests/testdata/cert/localhost_unsafe_ssl.ts.out
diff --git a/cli/tests/testdata/check_all.out b/cli/tests/testdata/check/check_all.out
index 344264634..344264634 100644
--- a/cli/tests/testdata/check_all.out
+++ b/cli/tests/testdata/check/check_all.out
diff --git a/cli/tests/testdata/check_all.ts b/cli/tests/testdata/check/check_all.ts
index 2ae8c2692..2ae8c2692 100644
--- a/cli/tests/testdata/check_all.ts
+++ b/cli/tests/testdata/check/check_all.ts
diff --git a/cli/tests/testdata/declaration_header_file_with_no_exports.ts b/cli/tests/testdata/check/declaration_header_file_with_no_exports.ts
index ef5da7a38..ef5da7a38 100644
--- a/cli/tests/testdata/declaration_header_file_with_no_exports.ts
+++ b/cli/tests/testdata/check/declaration_header_file_with_no_exports.ts
diff --git a/cli/tests/testdata/declaration_header_file_with_no_exports_js.d.ts b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts
index e69de29bb..e69de29bb 100644
--- a/cli/tests/testdata/declaration_header_file_with_no_exports_js.d.ts
+++ b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.d.ts
diff --git a/cli/tests/testdata/declaration_header_file_with_no_exports_js.js b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js
index b8ae2bcef..b8ae2bcef 100644
--- a/cli/tests/testdata/declaration_header_file_with_no_exports_js.js
+++ b/cli/tests/testdata/check/declaration_header_file_with_no_exports_js.js
diff --git a/cli/tests/testdata/check/module_detection_force.ts b/cli/tests/testdata/check/module_detection_force.ts
new file mode 100644
index 000000000..185ceb816
--- /dev/null
+++ b/cli/tests/testdata/check/module_detection_force.ts
@@ -0,0 +1,3 @@
+const a = 1;
+await import("./module_detection_force/import.ts");
+console.log(a);
diff --git a/cli/tests/testdata/module_detection_force_import.ts b/cli/tests/testdata/check/module_detection_force/import.ts
index 66b229870..66b229870 100644
--- a/cli/tests/testdata/module_detection_force_import.ts
+++ b/cli/tests/testdata/check/module_detection_force/import.ts
diff --git a/cli/tests/testdata/check/module_detection_force/main.ts b/cli/tests/testdata/check/module_detection_force/main.ts
new file mode 100644
index 000000000..a55c9962b
--- /dev/null
+++ b/cli/tests/testdata/check/module_detection_force/main.ts
@@ -0,0 +1,3 @@
+const a = 1;
+await import("./import.ts");
+console.log(a);
diff --git a/cli/tests/testdata/circular1.js b/cli/tests/testdata/circular1.js
deleted file mode 100644
index 8b2cc4960..000000000
--- a/cli/tests/testdata/circular1.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import "./circular2.js";
-console.log("circular1");
diff --git a/cli/tests/testdata/circular1.js.out b/cli/tests/testdata/circular1.js.out
deleted file mode 100644
index 21f7fd585..000000000
--- a/cli/tests/testdata/circular1.js.out
+++ /dev/null
@@ -1,2 +0,0 @@
-circular2
-circular1
diff --git a/cli/tests/testdata/circular2.js b/cli/tests/testdata/circular2.js
deleted file mode 100644
index 62127e04d..000000000
--- a/cli/tests/testdata/circular2.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import "./circular1.js";
-console.log("circular2");
diff --git a/cli/tests/testdata/028_args.ts b/cli/tests/testdata/compile/args.ts
index ec41d52f9..ec41d52f9 100644
--- a/cli/tests/testdata/028_args.ts
+++ b/cli/tests/testdata/compile/args.ts
diff --git a/cli/tests/testdata/standalone_error.ts b/cli/tests/testdata/compile/standalone_error.ts
index 279398113..279398113 100644
--- a/cli/tests/testdata/standalone_error.ts
+++ b/cli/tests/testdata/compile/standalone_error.ts
diff --git a/cli/tests/testdata/standalone_error_module_with_imports_1.ts b/cli/tests/testdata/compile/standalone_error_module_with_imports_1.ts
index bf38f7263..bf38f7263 100644
--- a/cli/tests/testdata/standalone_error_module_with_imports_1.ts
+++ b/cli/tests/testdata/compile/standalone_error_module_with_imports_1.ts
diff --git a/cli/tests/testdata/standalone_error_module_with_imports_2.ts b/cli/tests/testdata/compile/standalone_error_module_with_imports_2.ts
index ef052b512..ef052b512 100644
--- a/cli/tests/testdata/standalone_error_module_with_imports_2.ts
+++ b/cli/tests/testdata/compile/standalone_error_module_with_imports_2.ts
diff --git a/cli/tests/testdata/standalone_follow_redirects.ts b/cli/tests/testdata/compile/standalone_follow_redirects.ts
index f0957bc3d..f0957bc3d 100644
--- a/cli/tests/testdata/standalone_follow_redirects.ts
+++ b/cli/tests/testdata/compile/standalone_follow_redirects.ts
diff --git a/cli/tests/testdata/standalone_follow_redirects_2.js b/cli/tests/testdata/compile/standalone_follow_redirects_2.js
index c0130ef5a..c0130ef5a 100644
--- a/cli/tests/testdata/standalone_follow_redirects_2.js
+++ b/cli/tests/testdata/compile/standalone_follow_redirects_2.js
diff --git a/cli/tests/testdata/standalone_import_datauri.ts b/cli/tests/testdata/compile/standalone_import_datauri.ts
index 68f348828..68f348828 100644
--- a/cli/tests/testdata/standalone_import_datauri.ts
+++ b/cli/tests/testdata/compile/standalone_import_datauri.ts
diff --git a/cli/tests/testdata/compile/standalone_import_map.json b/cli/tests/testdata/compile/standalone_import_map.json
new file mode 100644
index 000000000..9e5b90bd7
--- /dev/null
+++ b/cli/tests/testdata/compile/standalone_import_map.json
@@ -0,0 +1,5 @@
+{
+ "imports": {
+ "hello": "../run/001_hello.js"
+ }
+}
diff --git a/cli/tests/testdata/standalone_import_map.ts b/cli/tests/testdata/compile/standalone_import_map.ts
index 097b96356..097b96356 100644
--- a/cli/tests/testdata/standalone_import_map.ts
+++ b/cli/tests/testdata/compile/standalone_import_map.ts
diff --git a/cli/tests/testdata/standalone_runtime_flags.ts b/cli/tests/testdata/compile/standalone_runtime_flags.ts
index 0154c7f4e..0154c7f4e 100644
--- a/cli/tests/testdata/standalone_runtime_flags.ts
+++ b/cli/tests/testdata/compile/standalone_runtime_flags.ts
diff --git a/cli/tests/testdata/config.ts.out b/cli/tests/testdata/config.ts.out
deleted file mode 100644
index 44b123f97..000000000
--- a/cli/tests/testdata/config.ts.out
+++ /dev/null
@@ -1,4 +0,0 @@
-[WILDCARD]Unsupported compiler options in "[WILDCARD]config.tsconfig.json".
- The following options were ignored:
- module, target
-Check [WILDCARD]/config.ts
diff --git a/cli/tests/testdata/config_json_import.ts b/cli/tests/testdata/config_json_import.ts
deleted file mode 100644
index d344c0fb7..000000000
--- a/cli/tests/testdata/config_json_import.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import config from "./jsx/deno-jsx.json" assert { type: "json" };
-console.log(config);
diff --git a/cli/tests/testdata/config_types_remote.tsconfig.json b/cli/tests/testdata/config_types_remote.tsconfig.json
deleted file mode 100644
index f40d5b1c4..000000000
--- a/cli/tests/testdata/config_types_remote.tsconfig.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "compilerOptions": {
- "types": [
- "http://localhost:4545/subdir/types.d.ts"
- ]
- }
-}
diff --git a/cli/tests/testdata/disallow_http_from_https_js.out b/cli/tests/testdata/disallow_http_from_https_js.out
deleted file mode 100644
index e4f9e8d59..000000000
--- a/cli/tests/testdata/disallow_http_from_https_js.out
+++ /dev/null
@@ -1,3 +0,0 @@
-error: Modules imported via https are not allowed to import http modules.
- Importing: http://localhost:4545/001_hello.js
- at https://localhost:5545/disallow_http_from_https.js:2:8
diff --git a/cli/tests/testdata/disallow_http_from_https_ts.out b/cli/tests/testdata/disallow_http_from_https_ts.out
deleted file mode 100644
index 3f885001f..000000000
--- a/cli/tests/testdata/disallow_http_from_https_ts.out
+++ /dev/null
@@ -1,3 +0,0 @@
-error: Modules imported via https are not allowed to import http modules.
- Importing: http://localhost:4545/001_hello.js
- at https://localhost:5545/disallow_http_from_https.ts:2:8
diff --git a/cli/tests/testdata/060_deno_doc_displays_all_overloads_in_details_view.ts b/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts
index 854c1b464..854c1b464 100644
--- a/cli/tests/testdata/060_deno_doc_displays_all_overloads_in_details_view.ts
+++ b/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts
diff --git a/cli/tests/testdata/060_deno_doc_displays_all_overloads_in_details_view.ts.out b/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts.out
index 2cd36931c..2cd36931c 100644
--- a/cli/tests/testdata/060_deno_doc_displays_all_overloads_in_details_view.ts.out
+++ b/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts.out
diff --git a/cli/tests/testdata/deno_doc.ts b/cli/tests/testdata/doc/deno_doc.ts
index fb3c50957..fb3c50957 100644
--- a/cli/tests/testdata/deno_doc.ts
+++ b/cli/tests/testdata/doc/deno_doc.ts
diff --git a/cli/tests/testdata/deno_doc_builtin.out b/cli/tests/testdata/doc/deno_doc_builtin.out
index b4a90d6bc..b4a90d6bc 100644
--- a/cli/tests/testdata/deno_doc_builtin.out
+++ b/cli/tests/testdata/doc/deno_doc_builtin.out
diff --git a/cli/tests/testdata/empty.out b/cli/tests/testdata/empty.out
deleted file mode 100644
index e69de29bb..000000000
--- a/cli/tests/testdata/empty.out
+++ /dev/null
diff --git a/cli/tests/testdata/error_002.ts b/cli/tests/testdata/error_002.ts
deleted file mode 100644
index 6aa0fcc3b..000000000
--- a/cli/tests/testdata/error_002.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { throwsError } from "./subdir/mod1.ts";
-
-function foo() {
- throwsError();
-}
-
-foo();
diff --git a/cli/tests/testdata/error_010_nonexistent_arg.disabled b/cli/tests/testdata/error_010_nonexistent_arg.disabled
deleted file mode 100644
index 9d183107c..000000000
--- a/cli/tests/testdata/error_010_nonexistent_arg.disabled
+++ /dev/null
@@ -1,4 +0,0 @@
-args: not-a-valid-filename.ts
-output: tests/error_010_nonexistent_arg.out
-exit_code: 1
-check_stderr: true
diff --git a/cli/tests/testdata/error_010_nonexistent_arg.out b/cli/tests/testdata/error_010_nonexistent_arg.out
deleted file mode 100644
index ef4f7b041..000000000
--- a/cli/tests/testdata/error_010_nonexistent_arg.out
+++ /dev/null
@@ -1 +0,0 @@
-[WILDCARD]Cannot resolve module "file:[WILDCARD]not-a-valid-filename.ts" from "."
diff --git a/cli/tests/testdata/error_026_remote_import_error.ts b/cli/tests/testdata/error_026_remote_import_error.ts
deleted file mode 100644
index 2718e768a..000000000
--- a/cli/tests/testdata/error_026_remote_import_error.ts
+++ /dev/null
@@ -1 +0,0 @@
-import "http://localhost:4545/error_001.ts";
diff --git a/cli/tests/testdata/error_026_remote_import_error.ts.out b/cli/tests/testdata/error_026_remote_import_error.ts.out
deleted file mode 100644
index bec0cf1c5..000000000
--- a/cli/tests/testdata/error_026_remote_import_error.ts.out
+++ /dev/null
@@ -1,7 +0,0 @@
-[WILDCARD]error: Uncaught Error: bad
- throw Error("bad");
- ^
- at foo (http://localhost:4545/error_001.ts:2:9)
- at bar (http://localhost:4545/error_001.ts:6:3)
- at http://localhost:4545/error_001.ts:9:1
-[WILDCARD]
diff --git a/cli/tests/testdata/error_no_check.ts b/cli/tests/testdata/error_no_check.ts
deleted file mode 100644
index db9257a1d..000000000
--- a/cli/tests/testdata/error_no_check.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { AnInterface, isAnInterface } from "./subdir/type_and_code.ts";
diff --git a/cli/tests/testdata/error_no_check.ts.out b/cli/tests/testdata/error_no_check.ts.out
deleted file mode 100644
index cac1367ba..000000000
--- a/cli/tests/testdata/error_no_check.ts.out
+++ /dev/null
@@ -1,2 +0,0 @@
-error: Uncaught SyntaxError: The requested module './subdir/type_and_code.ts' does not provide an export named 'AnInterface'
-[WILDCARD] \ No newline at end of file
diff --git a/cli/tests/testdata/error_type_definitions.ts b/cli/tests/testdata/error_type_definitions.ts
deleted file mode 100644
index ceb11787e..000000000
--- a/cli/tests/testdata/error_type_definitions.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// @deno-types="./type_definitions/bar.d.ts"
-import { Bar } from "./type_definitions/bar.js";
-
-const bar = new Bar();
-console.log(bar);
diff --git a/cli/tests/testdata/error_worker_permissions_local.ts b/cli/tests/testdata/error_worker_permissions_local.ts
deleted file mode 100644
index ed938a025..000000000
--- a/cli/tests/testdata/error_worker_permissions_local.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-new Worker(
- import.meta.resolve("./subdeb/worker_types.ts"),
- { type: "module" },
-);
diff --git a/cli/tests/testdata/041_dyn_import_eval.out b/cli/tests/testdata/eval/dyn_import_eval.out
index a1d6c3687..a1d6c3687 100644
--- a/cli/tests/testdata/041_dyn_import_eval.out
+++ b/cli/tests/testdata/eval/dyn_import_eval.out
diff --git a/cli/tests/testdata/export_type_def.ts b/cli/tests/testdata/export_type_def.ts
deleted file mode 100644
index e33b70a64..000000000
--- a/cli/tests/testdata/export_type_def.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-// @deno-types="./type_definitions/foo.d.ts"
-export { foo } from "./type_definitions/foo.js";
diff --git a/cli/tests/testdata/fix_emittable_skipped.js b/cli/tests/testdata/fix_emittable_skipped.js
deleted file mode 100644
index f61907b06..000000000
--- a/cli/tests/testdata/fix_emittable_skipped.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/// <reference types="./subdir/emittable.d.ts" />
-
-import "./subdir/polyfill.ts";
-
-export const a = "a";
-
-console.log(globalThis.polyfill);
diff --git a/cli/tests/testdata/fix_js_import_js.ts b/cli/tests/testdata/fix_js_import_js.ts
deleted file mode 100644
index c9f341748..000000000
--- a/cli/tests/testdata/fix_js_import_js.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { isMod4 } from "./subdir/mod6.js";
-
-console.log(isMod4);
diff --git a/cli/tests/testdata/fix_js_imports.ts b/cli/tests/testdata/fix_js_imports.ts
deleted file mode 100644
index 4770b1ab6..000000000
--- a/cli/tests/testdata/fix_js_imports.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import * as amdLike from "./subdir/amd_like.js";
-
-console.log(amdLike);
diff --git a/cli/tests/testdata/badly_formatted.json b/cli/tests/testdata/fmt/badly_formatted.json
index f2bacf73d..f2bacf73d 100644
--- a/cli/tests/testdata/badly_formatted.json
+++ b/cli/tests/testdata/fmt/badly_formatted.json
diff --git a/cli/tests/testdata/badly_formatted.md b/cli/tests/testdata/fmt/badly_formatted.md
index 26afe483b..26afe483b 100644
--- a/cli/tests/testdata/badly_formatted.md
+++ b/cli/tests/testdata/fmt/badly_formatted.md
diff --git a/cli/tests/testdata/badly_formatted.mjs b/cli/tests/testdata/fmt/badly_formatted.mjs
index bc515a330..bc515a330 100644
--- a/cli/tests/testdata/badly_formatted.mjs
+++ b/cli/tests/testdata/fmt/badly_formatted.mjs
diff --git a/cli/tests/testdata/badly_formatted_fixed.js b/cli/tests/testdata/fmt/badly_formatted_fixed.js
index e9062ba85..e9062ba85 100644
--- a/cli/tests/testdata/badly_formatted_fixed.js
+++ b/cli/tests/testdata/fmt/badly_formatted_fixed.js
diff --git a/cli/tests/testdata/badly_formatted_fixed.json b/cli/tests/testdata/fmt/badly_formatted_fixed.json
index 0d697a2c6..0d697a2c6 100644
--- a/cli/tests/testdata/badly_formatted_fixed.json
+++ b/cli/tests/testdata/fmt/badly_formatted_fixed.json
diff --git a/cli/tests/testdata/badly_formatted_fixed.md b/cli/tests/testdata/fmt/badly_formatted_fixed.md
index 8ba74cac3..8ba74cac3 100644
--- a/cli/tests/testdata/badly_formatted_fixed.md
+++ b/cli/tests/testdata/fmt/badly_formatted_fixed.md
diff --git a/cli/tests/testdata/fmt/with_config/subdir/a.ts b/cli/tests/testdata/fmt/with_config/subdir/a.ts
index 50db0d2e1..4baf8d485 100644
--- a/cli/tests/testdata/fmt/with_config/subdir/a.ts
+++ b/cli/tests/testdata/fmt/with_config/subdir/a.ts
@@ -3,7 +3,7 @@ Deno.test(
async function responseClone() {
const response =
await fetch(
- 'http://localhost:4545/fixture.json',
+ 'http://localhost:4545/assets/fixture.json',
);
const response1 =
response.clone();
diff --git a/cli/tests/testdata/fmt/with_config/subdir/b.ts b/cli/tests/testdata/fmt/with_config/subdir/b.ts
index 840198d89..d7eb08b09 100644
--- a/cli/tests/testdata/fmt/with_config/subdir/b.ts
+++ b/cli/tests/testdata/fmt/with_config/subdir/b.ts
@@ -3,10 +3,10 @@ Deno.test(
{ perms: { net: true } },
async function fetchBodyUsedCancelStream() {
const response = await fetch(
- "http://localhost:4545/fixture.json",
+ "http://localhost:4545/assets/fixture.json",
);
assert(response.body !== null);
-
+
assertEquals(response.bodyUsed, false);
const promise = response.body.cancel();
assertEquals(response.bodyUsed, true);
diff --git a/cli/tests/testdata/import_meta2.ts b/cli/tests/testdata/import_meta2.ts
deleted file mode 100644
index 7f59a5a46..000000000
--- a/cli/tests/testdata/import_meta2.ts
+++ /dev/null
@@ -1 +0,0 @@
-console.log("import_meta2", import.meta.url, import.meta.main);
diff --git a/cli/tests/testdata/031_info_ts_error.out b/cli/tests/testdata/info/031_info_ts_error.out
index 2dc7bb4e8..2dc7bb4e8 100644
--- a/cli/tests/testdata/031_info_ts_error.out
+++ b/cli/tests/testdata/info/031_info_ts_error.out
diff --git a/cli/tests/testdata/031_info_ts_error.ts b/cli/tests/testdata/info/031_info_ts_error.ts
index 9b7492dbe..9b7492dbe 100644
--- a/cli/tests/testdata/031_info_ts_error.ts
+++ b/cli/tests/testdata/info/031_info_ts_error.ts
diff --git a/cli/tests/testdata/041_info_flag.out b/cli/tests/testdata/info/041_info_flag.out
index 3506a29e4..3506a29e4 100644
--- a/cli/tests/testdata/041_info_flag.out
+++ b/cli/tests/testdata/info/041_info_flag.out
diff --git a/cli/tests/testdata/041_info_flag_location.out b/cli/tests/testdata/info/041_info_flag_location.out
index b9e72f659..b9e72f659 100644
--- a/cli/tests/testdata/041_info_flag_location.out
+++ b/cli/tests/testdata/info/041_info_flag_location.out
diff --git a/cli/tests/testdata/049_info_flag_script_jsx.out b/cli/tests/testdata/info/049_info_flag_script_jsx.out
index 860d127fe..16736c893 100644
--- a/cli/tests/testdata/049_info_flag_script_jsx.out
+++ b/cli/tests/testdata/info/049_info_flag_script_jsx.out
@@ -3,7 +3,7 @@ local: [WILDCARD]http[WILDCARD]127.0.0.1_PORT4545[WILDCARD]
type: TypeScript
dependencies: 8 unique (total [WILDCARD])
-http://127.0.0.1:4545/048_media_types_jsx.ts ([WILDCARD])
+http://127.0.0.1:4545/run/048_media_types_jsx.ts ([WILDCARD])
├── http://localhost:4545/subdir/mt_application_ecmascript_jsx.j2.jsx ([WILDCARD])
├── http://localhost:4545/subdir/mt_application_x_javascript_jsx.j4.jsx ([WILDCARD])
├── http://localhost:4545/subdir/mt_application_x_typescript_tsx.t4.tsx ([WILDCARD])
diff --git a/cli/tests/testdata/054_info_local_imports.out b/cli/tests/testdata/info/054_info_local_imports.out
index cde5ff3ab..cde5ff3ab 100644
--- a/cli/tests/testdata/054_info_local_imports.out
+++ b/cli/tests/testdata/info/054_info_local_imports.out
diff --git a/cli/tests/testdata/065_import_map_info.out b/cli/tests/testdata/info/065_import_map_info.out
index 8771d0594..8771d0594 100644
--- a/cli/tests/testdata/065_import_map_info.out
+++ b/cli/tests/testdata/info/065_import_map_info.out
diff --git a/cli/tests/testdata/076_info_json_deps_order.out b/cli/tests/testdata/info/076_info_json_deps_order.out
index db890ef02..db890ef02 100644
--- a/cli/tests/testdata/076_info_json_deps_order.out
+++ b/cli/tests/testdata/info/076_info_json_deps_order.out
diff --git a/cli/tests/testdata/076_info_json_deps_order.ts b/cli/tests/testdata/info/076_info_json_deps_order.ts
index b1ae75e68..b1ae75e68 100644
--- a/cli/tests/testdata/076_info_json_deps_order.ts
+++ b/cli/tests/testdata/info/076_info_json_deps_order.ts
diff --git a/cli/tests/testdata/error_009_missing_js_module.js b/cli/tests/testdata/info/error_009_missing_js_module.js
index e6ca88934..e6ca88934 100644
--- a/cli/tests/testdata/error_009_missing_js_module.js
+++ b/cli/tests/testdata/info/error_009_missing_js_module.js
diff --git a/cli/tests/testdata/error_009_missing_js_module.js.out b/cli/tests/testdata/info/error_009_missing_js_module.js.out
index edb08da1c..edb08da1c 100644
--- a/cli/tests/testdata/error_009_missing_js_module.js.out
+++ b/cli/tests/testdata/info/error_009_missing_js_module.js.out
diff --git a/cli/tests/testdata/info_json.out b/cli/tests/testdata/info/info_json.out
index 3215af742..3215af742 100644
--- a/cli/tests/testdata/info_json.out
+++ b/cli/tests/testdata/info/info_json.out
diff --git a/cli/tests/testdata/info_json_location.out b/cli/tests/testdata/info/info_json_location.out
index 510fa7749..510fa7749 100644
--- a/cli/tests/testdata/info_json_location.out
+++ b/cli/tests/testdata/info/info_json_location.out
diff --git a/cli/tests/testdata/info_missing_module.out b/cli/tests/testdata/info/info_missing_module.out
index 07f893eec..07f893eec 100644
--- a/cli/tests/testdata/info_missing_module.out
+++ b/cli/tests/testdata/info/info_missing_module.out
diff --git a/cli/tests/testdata/info_recursive_imports_test.out b/cli/tests/testdata/info/info_recursive_imports_test.out
index 10ee54534..10ee54534 100644
--- a/cli/tests/testdata/info_recursive_imports_test.out
+++ b/cli/tests/testdata/info/info_recursive_imports_test.out
diff --git a/cli/tests/testdata/info_recursive_imports_test.ts b/cli/tests/testdata/info/info_recursive_imports_test.ts
index c9ba44755..c9ba44755 100644
--- a/cli/tests/testdata/info_recursive_imports_test.ts
+++ b/cli/tests/testdata/info/info_recursive_imports_test.ts
diff --git a/cli/tests/testdata/info_type_import.out b/cli/tests/testdata/info/info_type_import.out
index 6b9869f1f..6b9869f1f 100644
--- a/cli/tests/testdata/info_type_import.out
+++ b/cli/tests/testdata/info/info_type_import.out
diff --git a/cli/tests/testdata/info/info_type_import.ts b/cli/tests/testdata/info/info_type_import.ts
new file mode 100644
index 000000000..4db9f3387
--- /dev/null
+++ b/cli/tests/testdata/info/info_type_import.ts
@@ -0,0 +1,3 @@
+import { AnInterface as _, isAnInterface } from "../subdir/type_and_code.ts";
+
+isAnInterface({});
diff --git a/cli/tests/testdata/055_info_file_json.out b/cli/tests/testdata/info/json_output/main.out
index 2dc10a0c2..124fc7351 100644
--- a/cli/tests/testdata/055_info_file_json.out
+++ b/cli/tests/testdata/info/json_output/main.out
@@ -1,12 +1,12 @@
{
"roots": [
- "file://[WILDCARD]/005_more_imports.ts"
+ "file://[WILDCARD]/info/json_output/main.ts"
],
"modules": [
{
"dependencies": [
{
- "specifier": "./subdir/mod1.ts",
+ "specifier": "../../subdir/mod1.ts",
"code": {
"specifier": "file://[WILDCARD]/subdir/mod1.ts",
"span": {
@@ -16,17 +16,17 @@
},
"end": {
"line": 0,
- "character": 70
+ "character": 74
}
}
}
}
],
"kind": "esm",
- "local": "[WILDCARD]005_more_imports.ts",
+ "local": "[WILDCARD]main.ts",
[WILDCARD]
"mediaType": "TypeScript",
- "specifier": "file://[WILDCARD]/005_more_imports.ts"
+ "specifier": "file://[WILDCARD]/json_output/main.ts"
},
{
"dependencies": [
diff --git a/cli/tests/testdata/info/json_output/main.ts b/cli/tests/testdata/info/json_output/main.ts
new file mode 100644
index 000000000..927bc55ed
--- /dev/null
+++ b/cli/tests/testdata/info/json_output/main.ts
@@ -0,0 +1,11 @@
+import { printHello3, returnsFoo2, returnsHi } from "../../subdir/mod1.ts";
+
+printHello3();
+
+if (returnsHi() !== "Hi") {
+ throw Error("Unexpected");
+}
+
+if (returnsFoo2() !== "Foo") {
+ throw Error("Unexpected");
+}
diff --git a/cli/tests/testdata/022_info_flag_script.out b/cli/tests/testdata/info/multiple_imports.out
index e86b7dda4..d4e315397 100644
--- a/cli/tests/testdata/022_info_flag_script.out
+++ b/cli/tests/testdata/info/multiple_imports.out
@@ -3,7 +3,7 @@ local: [WILDCARD]http[WILDCARD]127.0.0.1_PORT4545[WILDCARD]
type: TypeScript
dependencies: 8 unique (total [WILDCARD])
-http://127.0.0.1:4545/019_media_types.ts ([WILDCARD])
+http://127.0.0.1:4545/run/019_media_types.ts ([WILDCARD])
├── http://localhost:4545/subdir/mt_application_ecmascript.j2.js ([WILDCARD])
├── http://localhost:4545/subdir/mt_application_x_javascript.j4.js ([WILDCARD])
├── http://localhost:4545/subdir/mt_application_x_typescript.t4.ts ([WILDCARD])
diff --git a/cli/tests/testdata/recursive_imports/A.ts b/cli/tests/testdata/info/recursive_imports/A.ts
index 43ecdbe5e..43ecdbe5e 100644
--- a/cli/tests/testdata/recursive_imports/A.ts
+++ b/cli/tests/testdata/info/recursive_imports/A.ts
diff --git a/cli/tests/testdata/recursive_imports/B.ts b/cli/tests/testdata/info/recursive_imports/B.ts
index 9fff0fdc9..9fff0fdc9 100644
--- a/cli/tests/testdata/recursive_imports/B.ts
+++ b/cli/tests/testdata/info/recursive_imports/B.ts
diff --git a/cli/tests/testdata/recursive_imports/C.ts b/cli/tests/testdata/info/recursive_imports/C.ts
index e47e77b41..e47e77b41 100644
--- a/cli/tests/testdata/recursive_imports/C.ts
+++ b/cli/tests/testdata/info/recursive_imports/C.ts
diff --git a/cli/tests/testdata/recursive_imports/common.ts b/cli/tests/testdata/info/recursive_imports/common.ts
index 2b16a7bf1..2b16a7bf1 100644
--- a/cli/tests/testdata/recursive_imports/common.ts
+++ b/cli/tests/testdata/info/recursive_imports/common.ts
diff --git a/cli/tests/testdata/info_type_import.ts b/cli/tests/testdata/info_type_import.ts
deleted file mode 100644
index eeef46c89..000000000
--- a/cli/tests/testdata/info_type_import.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { AnInterface as _, isAnInterface } from "./subdir/type_and_code.ts";
-
-isAnInterface({});
diff --git a/cli/tests/testdata/inline_js_source_map_2.js b/cli/tests/testdata/inline_js_source_map_2.js
deleted file mode 100644
index 036f351b9..000000000
--- a/cli/tests/testdata/inline_js_source_map_2.js
+++ /dev/null
@@ -1,4 +0,0 @@
-"use strict";
-1 + 1;
-throw new Error("Hello world!");
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaHR0cDovL2xvY2FsaG9zdDo0NTQ1L2lubGluZV9qc19zb3VyY2VfbWFwXzIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLENBQUMsR0FBQyxDQUFDLENBQUM7QUFLSixNQUFNLElBQUksS0FBSyxDQUFDLGNBQStCLENBQUMsQ0FBQyJ9 \ No newline at end of file
diff --git a/cli/tests/testdata/inline_js_source_map_2.js.out b/cli/tests/testdata/inline_js_source_map_2.js.out
deleted file mode 100644
index 4f9127da6..000000000
--- a/cli/tests/testdata/inline_js_source_map_2.js.out
+++ /dev/null
@@ -1,2 +0,0 @@
-error: Uncaught Error: Hello world!
- at http://localhost:4545/inline_js_source_map_2.ts:6:7
diff --git a/cli/tests/testdata/inline_js_source_map_2_with_inline_contents.js b/cli/tests/testdata/inline_js_source_map_2_with_inline_contents.js
deleted file mode 100644
index 5bea615b8..000000000
--- a/cli/tests/testdata/inline_js_source_map_2_with_inline_contents.js
+++ /dev/null
@@ -1,4 +0,0 @@
-"use strict";
-
-throw new Error("Hello world!");
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaHR0cDovL2xvY2FsaG9zdDo0NTQ1L2lubGluZV9qc19zb3VyY2VfbWFwXzIudHMiXSwic291cmNlc0NvbnRlbnQiOlsiMSsxO1xuaW50ZXJmYWNlIFRlc3Qge1xuICBoZWxsbzogc3RyaW5nO1xufVxuXG50aHJvdyBuZXcgRXJyb3IoXCJIZWxsbyB3b3JsZCFcIiBhcyB1bmtub3duIGFzIHN0cmluZyk7XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLENBQUMsR0FBQyxDQUFDLENBQUM7QUFLSixNQUFNLElBQUksS0FBSyxDQUFDLGNBQStCLENBQUMsQ0FBQyJ9 \ No newline at end of file
diff --git a/cli/tests/testdata/inline_js_source_map_2_with_inline_contents.js.out b/cli/tests/testdata/inline_js_source_map_2_with_inline_contents.js.out
deleted file mode 100644
index 4f9127da6..000000000
--- a/cli/tests/testdata/inline_js_source_map_2_with_inline_contents.js.out
+++ /dev/null
@@ -1,2 +0,0 @@
-error: Uncaught Error: Hello world!
- at http://localhost:4545/inline_js_source_map_2.ts:6:7
diff --git a/cli/tests/testdata/inline_js_source_map_with_contents_from_graph.js b/cli/tests/testdata/inline_js_source_map_with_contents_from_graph.js
deleted file mode 100644
index decf47bdc..000000000
--- a/cli/tests/testdata/inline_js_source_map_with_contents_from_graph.js
+++ /dev/null
@@ -1,4 +0,0 @@
-"use strict";
-import "http://localhost:4545/inline_js_source_map.ts";
-throw new Error("Hello world!");
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaHR0cDovL2xvY2FsaG9zdDo0NTQ1L2lubGluZV9qc19zb3VyY2VfbWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxDQUFDLEdBQUMsQ0FBQyxDQUFDO0FBS0osTUFBTSxJQUFJLEtBQUssQ0FBQyxjQUErQixDQUFDLENBQUMifQ== \ No newline at end of file
diff --git a/cli/tests/testdata/issue13562.ts b/cli/tests/testdata/issue13562.ts
deleted file mode 100644
index 9f3134aef..000000000
--- a/cli/tests/testdata/issue13562.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { printHello3 } from "./subdir/mod1.ts?q=.json";
-
-printHello3();
diff --git a/cli/tests/testdata/lock_check_err.out b/cli/tests/testdata/lock_check_err.out
deleted file mode 100644
index 3c5eceb8c..000000000
--- a/cli/tests/testdata/lock_check_err.out
+++ /dev/null
@@ -1,3 +0,0 @@
-[WILDCARD]The source code is invalid, as it does not match the expected hash in the lock file.
- Specifier: http://127.0.0.1:4545/003_relative_import.ts
- Lock file: lock_check_err.json
diff --git a/cli/tests/testdata/lsp/code_action_redirect_response.json b/cli/tests/testdata/lsp/code_action_redirect_response.json
index b2bb470bd..235127570 100644
--- a/cli/tests/testdata/lsp/code_action_redirect_response.json
+++ b/cli/tests/testdata/lsp/code_action_redirect_response.json
@@ -17,10 +17,10 @@
"severity": 3,
"code": "redirect",
"source": "deno",
- "message": "The import of \"http://127.0.0.1:4545/x_deno_warning.js\" was redirected to \"http://127.0.0.1:4545/x_deno_warning_redirect.js\".",
+ "message": "The import of \"http://127.0.0.1:4545/x_deno_warning.js\" was redirected to \"http://127.0.0.1:4545/lsp/x_deno_warning_redirect.js\".",
"data": {
"specifier": "http://127.0.0.1:4545/x_deno_warning.js",
- "redirect": "http://127.0.0.1:4545/x_deno_warning_redirect.js"
+ "redirect": "http://127.0.0.1:4545/lsp/x_deno_warning_redirect.js"
}
}
],
@@ -38,7 +38,7 @@
"character": 60
}
},
- "newText": "\"http://127.0.0.1:4545/x_deno_warning_redirect.js\""
+ "newText": "\"http://127.0.0.1:4545/lsp/x_deno_warning_redirect.js\""
}
]
}
diff --git a/cli/tests/testdata/x_deno_warning_redirect.js b/cli/tests/testdata/lsp/x_deno_warning_redirect.js
index 34b950566..34b950566 100644
--- a/cli/tests/testdata/x_deno_warning_redirect.js
+++ b/cli/tests/testdata/lsp/x_deno_warning_redirect.js
diff --git a/cli/tests/testdata/main_module.ts b/cli/tests/testdata/main_module.ts
deleted file mode 100644
index 19988f4bf..000000000
--- a/cli/tests/testdata/main_module.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-console.log("main_module", Deno.mainModule);
-
-import "./main_module2.ts";
diff --git a/cli/tests/testdata/main_module.ts.out b/cli/tests/testdata/main_module.ts.out
deleted file mode 100644
index 817bb6b8c..000000000
--- a/cli/tests/testdata/main_module.ts.out
+++ /dev/null
@@ -1,2 +0,0 @@
-main_module2 [WILDCARD]/main_module.ts
-main_module [WILDCARD]/main_module.ts
diff --git a/cli/tests/testdata/main_module2.ts b/cli/tests/testdata/main_module2.ts
deleted file mode 100644
index 585615c7f..000000000
--- a/cli/tests/testdata/main_module2.ts
+++ /dev/null
@@ -1 +0,0 @@
-console.log("main_module2", Deno.mainModule);
diff --git a/cli/tests/testdata/module_detection_force.ts b/cli/tests/testdata/module_detection_force.ts
deleted file mode 100644
index 7729ae366..000000000
--- a/cli/tests/testdata/module_detection_force.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-const a = 1;
-await import("./module_detection_force_import.ts");
-console.log(a);
diff --git a/cli/tests/testdata/nested_error.ts.out b/cli/tests/testdata/nested_error.ts.out
deleted file mode 100644
index 042a179ff..000000000
--- a/cli/tests/testdata/nested_error.ts.out
+++ /dev/null
@@ -1,4 +0,0 @@
-error: Uncaught {
- foo: Error
- at file:///[WILDCARD]testdata/nested_error.ts:2:8
-}
diff --git a/cli/tests/testdata/no_color.js b/cli/tests/testdata/no_color.js
deleted file mode 100644
index cea11a52f..000000000
--- a/cli/tests/testdata/no_color.js
+++ /dev/null
@@ -1 +0,0 @@
-console.log("noColor", Deno.noColor);
diff --git a/cli/tests/testdata/raw_mode.ts b/cli/tests/testdata/raw_mode.ts
deleted file mode 100644
index 87502e7d9..000000000
--- a/cli/tests/testdata/raw_mode.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-Deno.setRaw(0, true);
-Deno.setRaw(0, true); // Can be called multiple times
-
-Deno.stdout.writeSync(new TextEncoder().encode("S"));
-
-const buf = new Uint8Array(3);
-for (let i = 0; i < 3; i++) {
- const nread = await Deno.stdin.read(buf);
- if (nread === null) {
- break;
- } else {
- const data = new TextDecoder().decode(buf.subarray(0, nread));
- Deno.stdout.writeSync(new TextEncoder().encode(data.toUpperCase()));
- }
-}
-
-Deno.setRaw(0, false); // restores old mode.
-Deno.setRaw(0, false); // Can be safely called multiple times
diff --git a/cli/tests/testdata/import_type.ts b/cli/tests/testdata/repl/import_type.ts
index 851ebad86..851ebad86 100644
--- a/cli/tests/testdata/import_type.ts
+++ b/cli/tests/testdata/repl/import_type.ts
diff --git a/cli/tests/testdata/001_hello.js b/cli/tests/testdata/run/001_hello.js
index accefceba..accefceba 100644
--- a/cli/tests/testdata/001_hello.js
+++ b/cli/tests/testdata/run/001_hello.js
diff --git a/cli/tests/testdata/001_hello.js.out b/cli/tests/testdata/run/001_hello.js.out
index 557db03de..557db03de 100644
--- a/cli/tests/testdata/001_hello.js.out
+++ b/cli/tests/testdata/run/001_hello.js.out
diff --git a/cli/tests/testdata/002_hello.ts b/cli/tests/testdata/run/002_hello.ts
index accefceba..accefceba 100644
--- a/cli/tests/testdata/002_hello.ts
+++ b/cli/tests/testdata/run/002_hello.ts
diff --git a/cli/tests/testdata/002_hello.ts.out b/cli/tests/testdata/run/002_hello.ts.out
index 557db03de..557db03de 100644
--- a/cli/tests/testdata/002_hello.ts.out
+++ b/cli/tests/testdata/run/002_hello.ts.out
diff --git a/cli/tests/testdata/run/003_relative_import.ts b/cli/tests/testdata/run/003_relative_import.ts
new file mode 100644
index 000000000..840121bfe
--- /dev/null
+++ b/cli/tests/testdata/run/003_relative_import.ts
@@ -0,0 +1,3 @@
+import { printHello } from "../subdir/print_hello.ts";
+
+printHello();
diff --git a/cli/tests/testdata/003_relative_import.ts.out b/cli/tests/testdata/run/003_relative_import.ts.out
index 699b756ed..699b756ed 100644
--- a/cli/tests/testdata/003_relative_import.ts.out
+++ b/cli/tests/testdata/run/003_relative_import.ts.out
diff --git a/cli/tests/testdata/004_set_timeout.ts b/cli/tests/testdata/run/004_set_timeout.ts
index 214b25086..214b25086 100644
--- a/cli/tests/testdata/004_set_timeout.ts
+++ b/cli/tests/testdata/run/004_set_timeout.ts
diff --git a/cli/tests/testdata/004_set_timeout.ts.out b/cli/tests/testdata/run/004_set_timeout.ts.out
index f9264f7fb..f9264f7fb 100644
--- a/cli/tests/testdata/004_set_timeout.ts.out
+++ b/cli/tests/testdata/run/004_set_timeout.ts.out
diff --git a/cli/tests/testdata/005_more_imports.ts b/cli/tests/testdata/run/005_more_imports.ts
index 0266bf46c..6c96fac64 100644
--- a/cli/tests/testdata/005_more_imports.ts
+++ b/cli/tests/testdata/run/005_more_imports.ts
@@ -1,4 +1,4 @@
-import { printHello3, returnsFoo2, returnsHi } from "./subdir/mod1.ts";
+import { printHello3, returnsFoo2, returnsHi } from "../subdir/mod1.ts";
printHello3();
diff --git a/cli/tests/testdata/005_more_imports.ts.out b/cli/tests/testdata/run/005_more_imports.ts.out
index e965047ad..e965047ad 100644
--- a/cli/tests/testdata/005_more_imports.ts.out
+++ b/cli/tests/testdata/run/005_more_imports.ts.out
diff --git a/cli/tests/testdata/006_url_imports.ts b/cli/tests/testdata/run/006_url_imports.ts
index 4036f27ed..4036f27ed 100644
--- a/cli/tests/testdata/006_url_imports.ts
+++ b/cli/tests/testdata/run/006_url_imports.ts
diff --git a/cli/tests/testdata/006_url_imports.ts.out b/cli/tests/testdata/run/006_url_imports.ts.out
index 989ce33e9..989ce33e9 100644
--- a/cli/tests/testdata/006_url_imports.ts.out
+++ b/cli/tests/testdata/run/006_url_imports.ts.out
diff --git a/cli/tests/testdata/012_async.ts b/cli/tests/testdata/run/012_async.ts
index 536197b68..536197b68 100644
--- a/cli/tests/testdata/012_async.ts
+++ b/cli/tests/testdata/run/012_async.ts
diff --git a/cli/tests/testdata/012_async.ts.out b/cli/tests/testdata/run/012_async.ts.out
index 01e79c32a..01e79c32a 100644
--- a/cli/tests/testdata/012_async.ts.out
+++ b/cli/tests/testdata/run/012_async.ts.out
diff --git a/cli/tests/testdata/013_dynamic_import.ts b/cli/tests/testdata/run/013_dynamic_import.ts
index d4dc55152..fc231936c 100644
--- a/cli/tests/testdata/013_dynamic_import.ts
+++ b/cli/tests/testdata/run/013_dynamic_import.ts
@@ -1,6 +1,6 @@
(async () => {
const { returnsHi, returnsFoo2, printHello3 } = await import(
- "./subdir/mod1.ts"
+ "../subdir/mod1.ts"
);
printHello3();
diff --git a/cli/tests/testdata/013_dynamic_import.ts.out b/cli/tests/testdata/run/013_dynamic_import.ts.out
index e965047ad..e965047ad 100644
--- a/cli/tests/testdata/013_dynamic_import.ts.out
+++ b/cli/tests/testdata/run/013_dynamic_import.ts.out
diff --git a/cli/tests/testdata/run/014_duplicate_import.ts b/cli/tests/testdata/run/014_duplicate_import.ts
new file mode 100644
index 000000000..c7dd881cf
--- /dev/null
+++ b/cli/tests/testdata/run/014_duplicate_import.ts
@@ -0,0 +1,9 @@
+// with all the imports of the same module, the module should only be
+// instantiated once
+import "../subdir/auto_print_hello.ts";
+
+import "../subdir/auto_print_hello.ts";
+
+(async () => {
+ await import("../subdir/auto_print_hello.ts");
+})();
diff --git a/cli/tests/testdata/014_duplicate_import.ts.out b/cli/tests/testdata/run/014_duplicate_import.ts.out
index 4effa19f4..4effa19f4 100644
--- a/cli/tests/testdata/014_duplicate_import.ts.out
+++ b/cli/tests/testdata/run/014_duplicate_import.ts.out
diff --git a/cli/tests/testdata/015_duplicate_parallel_import.js b/cli/tests/testdata/run/015_duplicate_parallel_import.js
index 172eeaf53..2fbe2c732 100644
--- a/cli/tests/testdata/015_duplicate_parallel_import.js
+++ b/cli/tests/testdata/run/015_duplicate_parallel_import.js
@@ -3,7 +3,7 @@
const promises = new Array(100)
.fill(null)
- .map(() => import("./subdir/mod1.ts"));
+ .map(() => import("../subdir/mod1.ts"));
Promise.all(promises).then((imports) => {
const mod = imports.reduce((first, cur) => {
diff --git a/cli/tests/testdata/015_duplicate_parallel_import.js.out b/cli/tests/testdata/run/015_duplicate_parallel_import.js.out
index e965047ad..e965047ad 100644
--- a/cli/tests/testdata/015_duplicate_parallel_import.js.out
+++ b/cli/tests/testdata/run/015_duplicate_parallel_import.js.out
diff --git a/cli/tests/testdata/016_double_await.ts b/cli/tests/testdata/run/016_double_await.ts
index 457a53ff3..457a53ff3 100644
--- a/cli/tests/testdata/016_double_await.ts
+++ b/cli/tests/testdata/run/016_double_await.ts
diff --git a/cli/tests/testdata/016_double_await.ts.out b/cli/tests/testdata/run/016_double_await.ts.out
index da29283aa..da29283aa 100644
--- a/cli/tests/testdata/016_double_await.ts.out
+++ b/cli/tests/testdata/run/016_double_await.ts.out
diff --git a/cli/tests/testdata/017_import_redirect.ts b/cli/tests/testdata/run/017_import_redirect.ts
index 1265dd4ed..1265dd4ed 100644
--- a/cli/tests/testdata/017_import_redirect.ts
+++ b/cli/tests/testdata/run/017_import_redirect.ts
diff --git a/cli/tests/testdata/017_import_redirect.ts.out b/cli/tests/testdata/run/017_import_redirect.ts.out
index e965047ad..e965047ad 100644
--- a/cli/tests/testdata/017_import_redirect.ts.out
+++ b/cli/tests/testdata/run/017_import_redirect.ts.out
diff --git a/cli/tests/testdata/017_import_redirect_info.out b/cli/tests/testdata/run/017_import_redirect_info.out
index d3a2e86fc..d3a2e86fc 100644
--- a/cli/tests/testdata/017_import_redirect_info.out
+++ b/cli/tests/testdata/run/017_import_redirect_info.out
diff --git a/cli/tests/testdata/018_async_catch.ts b/cli/tests/testdata/run/018_async_catch.ts
index ac43a52e8..ac43a52e8 100644
--- a/cli/tests/testdata/018_async_catch.ts
+++ b/cli/tests/testdata/run/018_async_catch.ts
diff --git a/cli/tests/testdata/018_async_catch.ts.out b/cli/tests/testdata/run/018_async_catch.ts.out
index 4fc219973..4fc219973 100644
--- a/cli/tests/testdata/018_async_catch.ts.out
+++ b/cli/tests/testdata/run/018_async_catch.ts.out
diff --git a/cli/tests/testdata/019_media_types.ts b/cli/tests/testdata/run/019_media_types.ts
index d985bd249..d985bd249 100644
--- a/cli/tests/testdata/019_media_types.ts
+++ b/cli/tests/testdata/run/019_media_types.ts
diff --git a/cli/tests/testdata/019_media_types.ts.out b/cli/tests/testdata/run/019_media_types.ts.out
index b3e94678c..b3e94678c 100644
--- a/cli/tests/testdata/019_media_types.ts.out
+++ b/cli/tests/testdata/run/019_media_types.ts.out
diff --git a/cli/tests/testdata/run/020_json_modules.ts b/cli/tests/testdata/run/020_json_modules.ts
new file mode 100644
index 000000000..b4ae60665
--- /dev/null
+++ b/cli/tests/testdata/run/020_json_modules.ts
@@ -0,0 +1,2 @@
+import config from "../subdir/config.json";
+console.log(JSON.stringify(config));
diff --git a/cli/tests/testdata/020_json_modules.ts.out b/cli/tests/testdata/run/020_json_modules.ts.out
index da33c40bf..da33c40bf 100644
--- a/cli/tests/testdata/020_json_modules.ts.out
+++ b/cli/tests/testdata/run/020_json_modules.ts.out
diff --git a/cli/tests/testdata/run/021_mjs_modules.ts b/cli/tests/testdata/run/021_mjs_modules.ts
new file mode 100644
index 000000000..838cd2c38
--- /dev/null
+++ b/cli/tests/testdata/run/021_mjs_modules.ts
@@ -0,0 +1,2 @@
+import { isMod5 } from "../subdir/mod5.mjs";
+console.log(isMod5);
diff --git a/cli/tests/testdata/021_mjs_modules.ts.out b/cli/tests/testdata/run/021_mjs_modules.ts.out
index 27ba77dda..27ba77dda 100644
--- a/cli/tests/testdata/021_mjs_modules.ts.out
+++ b/cli/tests/testdata/run/021_mjs_modules.ts.out
diff --git a/cli/tests/testdata/run/023_no_ext b/cli/tests/testdata/run/023_no_ext
new file mode 100644
index 000000000..d2cd6a037
--- /dev/null
+++ b/cli/tests/testdata/run/023_no_ext
@@ -0,0 +1,2 @@
+import * as mod4 from "../subdir/mod4.js";
+console.log(mod4.isMod4);
diff --git a/cli/tests/testdata/023_no_ext.out b/cli/tests/testdata/run/023_no_ext.out
index 27ba77dda..27ba77dda 100644
--- a/cli/tests/testdata/023_no_ext.out
+++ b/cli/tests/testdata/run/023_no_ext.out
diff --git a/cli/tests/testdata/025_hrtime.ts b/cli/tests/testdata/run/025_hrtime.ts
index b69d61488..b69d61488 100644
--- a/cli/tests/testdata/025_hrtime.ts
+++ b/cli/tests/testdata/run/025_hrtime.ts
diff --git a/cli/tests/testdata/025_hrtime.ts.out b/cli/tests/testdata/run/025_hrtime.ts.out
index bb101b641..bb101b641 100644
--- a/cli/tests/testdata/025_hrtime.ts.out
+++ b/cli/tests/testdata/run/025_hrtime.ts.out
diff --git a/cli/tests/testdata/025_reload_js_type_error.js b/cli/tests/testdata/run/025_reload_js_type_error.js
index 3b7c23cc9..3b7c23cc9 100644
--- a/cli/tests/testdata/025_reload_js_type_error.js
+++ b/cli/tests/testdata/run/025_reload_js_type_error.js
diff --git a/cli/tests/testdata/025_reload_js_type_error.js.out b/cli/tests/testdata/run/025_reload_js_type_error.js.out
index ce0136250..ce0136250 100644
--- a/cli/tests/testdata/025_reload_js_type_error.js.out
+++ b/cli/tests/testdata/run/025_reload_js_type_error.js.out
diff --git a/cli/tests/testdata/026_redirect_javascript.js b/cli/tests/testdata/run/026_redirect_javascript.js
index 226a6b622..226a6b622 100644
--- a/cli/tests/testdata/026_redirect_javascript.js
+++ b/cli/tests/testdata/run/026_redirect_javascript.js
diff --git a/cli/tests/testdata/026_redirect_javascript.js.out b/cli/tests/testdata/run/026_redirect_javascript.js.out
index 290864299..290864299 100644
--- a/cli/tests/testdata/026_redirect_javascript.js.out
+++ b/cli/tests/testdata/run/026_redirect_javascript.js.out
diff --git a/cli/tests/testdata/027_redirect_typescript.ts b/cli/tests/testdata/run/027_redirect_typescript.ts
index 584341975..584341975 100644
--- a/cli/tests/testdata/027_redirect_typescript.ts
+++ b/cli/tests/testdata/run/027_redirect_typescript.ts
diff --git a/cli/tests/testdata/027_redirect_typescript.ts.out b/cli/tests/testdata/run/027_redirect_typescript.ts.out
index 480d4e8ca..480d4e8ca 100644
--- a/cli/tests/testdata/027_redirect_typescript.ts.out
+++ b/cli/tests/testdata/run/027_redirect_typescript.ts.out
diff --git a/cli/tests/testdata/run/028_args.ts b/cli/tests/testdata/run/028_args.ts
new file mode 100644
index 000000000..ec41d52f9
--- /dev/null
+++ b/cli/tests/testdata/run/028_args.ts
@@ -0,0 +1,3 @@
+Deno.args.forEach((arg) => {
+ console.log(arg);
+});
diff --git a/cli/tests/testdata/028_args.ts.out b/cli/tests/testdata/run/028_args.ts.out
index 0f1b5c59e..0f1b5c59e 100644
--- a/cli/tests/testdata/028_args.ts.out
+++ b/cli/tests/testdata/run/028_args.ts.out
diff --git a/cli/tests/testdata/033_import_map.out b/cli/tests/testdata/run/033_import_map.out
index e9b9160e9..e9b9160e9 100644
--- a/cli/tests/testdata/033_import_map.out
+++ b/cli/tests/testdata/run/033_import_map.out
diff --git a/cli/tests/testdata/033_import_map_remote.out b/cli/tests/testdata/run/033_import_map_remote.out
index 804fa0d57..804fa0d57 100644
--- a/cli/tests/testdata/033_import_map_remote.out
+++ b/cli/tests/testdata/run/033_import_map_remote.out
diff --git a/cli/tests/testdata/run/035_cached_only_flag.out b/cli/tests/testdata/run/035_cached_only_flag.out
new file mode 100644
index 000000000..3bda398b6
--- /dev/null
+++ b/cli/tests/testdata/run/035_cached_only_flag.out
@@ -0,0 +1,4 @@
+error: Specifier not found in cache: "http://127.0.0.1:4545/run/019_media_types.ts", --cached-only is specified.
+
+Caused by:
+ Specifier not found in cache: "http://127.0.0.1:4545/run/019_media_types.ts", --cached-only is specified.
diff --git a/cli/tests/testdata/038_checkjs.js b/cli/tests/testdata/run/038_checkjs.js
index f0856d94c..f0856d94c 100644
--- a/cli/tests/testdata/038_checkjs.js
+++ b/cli/tests/testdata/run/038_checkjs.js
diff --git a/cli/tests/testdata/038_checkjs.js.out b/cli/tests/testdata/run/038_checkjs.js.out
index 4ea473e4f..4ea473e4f 100644
--- a/cli/tests/testdata/038_checkjs.js.out
+++ b/cli/tests/testdata/run/038_checkjs.js.out
diff --git a/cli/tests/testdata/042_dyn_import_evalcontext.ts b/cli/tests/testdata/run/042_dyn_import_evalcontext.ts
index ccda3a972..ccda3a972 100644
--- a/cli/tests/testdata/042_dyn_import_evalcontext.ts
+++ b/cli/tests/testdata/run/042_dyn_import_evalcontext.ts
diff --git a/cli/tests/testdata/042_dyn_import_evalcontext.ts.out b/cli/tests/testdata/run/042_dyn_import_evalcontext.ts.out
index 12a45b8da..12a45b8da 100644
--- a/cli/tests/testdata/042_dyn_import_evalcontext.ts.out
+++ b/cli/tests/testdata/run/042_dyn_import_evalcontext.ts.out
diff --git a/cli/tests/testdata/run/044_bad_resource.ts b/cli/tests/testdata/run/044_bad_resource.ts
new file mode 100644
index 000000000..b956a3e3f
--- /dev/null
+++ b/cli/tests/testdata/run/044_bad_resource.ts
@@ -0,0 +1,3 @@
+const file = await Deno.open("./run/044_bad_resource.ts", { read: true });
+file.close();
+await file.seek(10, 0);
diff --git a/cli/tests/testdata/044_bad_resource.ts.out b/cli/tests/testdata/run/044_bad_resource.ts.out
index c9912711d..c9912711d 100644
--- a/cli/tests/testdata/044_bad_resource.ts.out
+++ b/cli/tests/testdata/run/044_bad_resource.ts.out
diff --git a/cli/tests/testdata/045_mod.ts b/cli/tests/testdata/run/045_mod.ts
index b5f2a0b5b..b5f2a0b5b 100644
--- a/cli/tests/testdata/045_mod.ts
+++ b/cli/tests/testdata/run/045_mod.ts
diff --git a/cli/tests/testdata/045_output.ts b/cli/tests/testdata/run/045_output.ts
index 398760ca0..398760ca0 100644
--- a/cli/tests/testdata/045_output.ts
+++ b/cli/tests/testdata/run/045_output.ts
diff --git a/cli/tests/testdata/045_programmatic_proxy_client.ts b/cli/tests/testdata/run/045_programmatic_proxy_client.ts
index 039c6e9ae..8bc45a4b6 100644
--- a/cli/tests/testdata/045_programmatic_proxy_client.ts
+++ b/cli/tests/testdata/run/045_programmatic_proxy_client.ts
@@ -8,7 +8,7 @@ const client = Deno.createHttpClient({
});
const res = await fetch(
- "http://localhost:4545/045_mod.ts",
+ "http://localhost:4545/run/045_mod.ts",
{ client },
);
console.log(`Response http: ${await res.text()}`);
diff --git a/cli/tests/testdata/045_proxy_client.ts b/cli/tests/testdata/run/045_proxy_client.ts
index 9d068bc48..2a8728afa 100644
--- a/cli/tests/testdata/045_proxy_client.ts
+++ b/cli/tests/testdata/run/045_proxy_client.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
const res = await fetch(
- "http://localhost:4545/045_mod.ts",
+ "http://localhost:4545/run/045_mod.ts",
);
console.log(`Response http: ${await res.text()}`);
diff --git a/cli/tests/testdata/045_proxy_test.ts b/cli/tests/testdata/run/045_proxy_test.ts
index 6a4e72aff..0ff7184b1 100644
--- a/cli/tests/testdata/045_proxy_test.ts
+++ b/cli/tests/testdata/run/045_proxy_test.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
-import { Server } from "../../../test_util/std/http/server.ts";
-import { assertEquals } from "../../../test_util/std/testing/asserts.ts";
+import { Server } from "../../../../test_util/std/http/server.ts";
+import { assertEquals } from "../../../../test_util/std/testing/asserts.ts";
const addr = Deno.args[1] || "localhost:4555";
@@ -37,7 +37,7 @@ async function testFetch() {
"--quiet",
"--reload",
"--allow-net",
- "045_proxy_client.ts",
+ "run/045_proxy_client.ts",
],
env: {
HTTP_PROXY: `http://${addr}`,
@@ -53,7 +53,7 @@ async function testModuleDownload() {
"cache",
"--reload",
"--quiet",
- "http://localhost:4545/045_mod.ts",
+ "http://localhost:4545/run/045_mod.ts",
],
env: {
HTTP_PROXY: `http://${addr}`,
@@ -70,7 +70,7 @@ async function testFetchNoProxy() {
"--quiet",
"--reload",
"--allow-net",
- "045_proxy_client.ts",
+ "run/045_proxy_client.ts",
],
env: {
HTTP_PROXY: "http://not.exising.proxy.server",
@@ -87,7 +87,7 @@ async function testModuleDownloadNoProxy() {
"cache",
"--reload",
"--quiet",
- "http://localhost:4545/045_mod.ts",
+ "http://localhost:4545/run/045_mod.ts",
],
env: {
HTTP_PROXY: "http://not.exising.proxy.server",
@@ -106,7 +106,7 @@ async function testFetchProgrammaticProxy() {
"--reload",
"--allow-net=localhost:4545,localhost:4555",
"--unstable",
- "045_programmatic_proxy_client.ts",
+ "run/045_programmatic_proxy_client.ts",
],
});
assertEquals(code, 0);
diff --git a/cli/tests/testdata/run/045_proxy_test.ts.out b/cli/tests/testdata/run/045_proxy_test.ts.out
new file mode 100644
index 000000000..a1e567a14
--- /dev/null
+++ b/cli/tests/testdata/run/045_proxy_test.ts.out
@@ -0,0 +1,6 @@
+Proxy server listening on [WILDCARD]
+Proxy request to: http://localhost:4545/run/045_mod.ts
+Proxy request to: http://localhost:4545/run/045_mod.ts
+Proxy request to: http://localhost:4545/run/045_output.ts
+Proxy request to: http://localhost:4545/run/045_mod.ts
+proxy-authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
diff --git a/cli/tests/testdata/046_jsx_test.tsx b/cli/tests/testdata/run/046_jsx_test.tsx
index 5ed3ff2fa..5ed3ff2fa 100644
--- a/cli/tests/testdata/046_jsx_test.tsx
+++ b/cli/tests/testdata/run/046_jsx_test.tsx
diff --git a/cli/tests/testdata/046_jsx_test.tsx.out b/cli/tests/testdata/run/046_jsx_test.tsx.out
index 85cfe824b..85cfe824b 100644
--- a/cli/tests/testdata/046_jsx_test.tsx.out
+++ b/cli/tests/testdata/run/046_jsx_test.tsx.out
diff --git a/cli/tests/testdata/047_jsx_test.jsx b/cli/tests/testdata/run/047_jsx_test.jsx
index 4c2314072..4c2314072 100644
--- a/cli/tests/testdata/047_jsx_test.jsx
+++ b/cli/tests/testdata/run/047_jsx_test.jsx
diff --git a/cli/tests/testdata/047_jsx_test.jsx.out b/cli/tests/testdata/run/047_jsx_test.jsx.out
index 85cfe824b..85cfe824b 100644
--- a/cli/tests/testdata/047_jsx_test.jsx.out
+++ b/cli/tests/testdata/run/047_jsx_test.jsx.out
diff --git a/cli/tests/testdata/048_media_types_jsx.ts b/cli/tests/testdata/run/048_media_types_jsx.ts
index 8dcd0ad68..8dcd0ad68 100644
--- a/cli/tests/testdata/048_media_types_jsx.ts
+++ b/cli/tests/testdata/run/048_media_types_jsx.ts
diff --git a/cli/tests/testdata/048_media_types_jsx.ts.out b/cli/tests/testdata/run/048_media_types_jsx.ts.out
index 266cc5741..266cc5741 100644
--- a/cli/tests/testdata/048_media_types_jsx.ts.out
+++ b/cli/tests/testdata/run/048_media_types_jsx.ts.out
diff --git a/cli/tests/testdata/run/052_no_remote_flag.out b/cli/tests/testdata/run/052_no_remote_flag.out
new file mode 100644
index 000000000..f511f6d94
--- /dev/null
+++ b/cli/tests/testdata/run/052_no_remote_flag.out
@@ -0,0 +1,4 @@
+error: A remote specifier was requested: "http://127.0.0.1:4545/run/019_media_types.ts", but --no-remote is specified.
+
+Caused by:
+ A remote specifier was requested: "http://127.0.0.1:4545/run/019_media_types.ts", but --no-remote is specified.
diff --git a/cli/tests/testdata/056_make_temp_file_write_perm.out b/cli/tests/testdata/run/056_make_temp_file_write_perm.out
index c56aae43f..c56aae43f 100644
--- a/cli/tests/testdata/056_make_temp_file_write_perm.out
+++ b/cli/tests/testdata/run/056_make_temp_file_write_perm.out
diff --git a/cli/tests/testdata/056_make_temp_file_write_perm.ts b/cli/tests/testdata/run/056_make_temp_file_write_perm.ts
index c0deda8a2..c0deda8a2 100644
--- a/cli/tests/testdata/056_make_temp_file_write_perm.ts
+++ b/cli/tests/testdata/run/056_make_temp_file_write_perm.ts
diff --git a/cli/tests/testdata/058_tasks_microtasks_close.ts b/cli/tests/testdata/run/058_tasks_microtasks_close.ts
index 38e156044..38e156044 100644
--- a/cli/tests/testdata/058_tasks_microtasks_close.ts
+++ b/cli/tests/testdata/run/058_tasks_microtasks_close.ts
diff --git a/cli/tests/testdata/058_tasks_microtasks_close.ts.out b/cli/tests/testdata/run/058_tasks_microtasks_close.ts.out
index 218273cab..218273cab 100644
--- a/cli/tests/testdata/058_tasks_microtasks_close.ts.out
+++ b/cli/tests/testdata/run/058_tasks_microtasks_close.ts.out
diff --git a/cli/tests/testdata/059_fs_relative_path_perm.ts b/cli/tests/testdata/run/059_fs_relative_path_perm.ts
index 26630fe1c..26630fe1c 100644
--- a/cli/tests/testdata/059_fs_relative_path_perm.ts
+++ b/cli/tests/testdata/run/059_fs_relative_path_perm.ts
diff --git a/cli/tests/testdata/059_fs_relative_path_perm.ts.out b/cli/tests/testdata/run/059_fs_relative_path_perm.ts.out
index b55412137..b55412137 100644
--- a/cli/tests/testdata/059_fs_relative_path_perm.ts.out
+++ b/cli/tests/testdata/run/059_fs_relative_path_perm.ts.out
diff --git a/cli/tests/testdata/061_permissions_request.ts b/cli/tests/testdata/run/061_permissions_request.ts
index c31e7ac42..c31e7ac42 100644
--- a/cli/tests/testdata/061_permissions_request.ts
+++ b/cli/tests/testdata/run/061_permissions_request.ts
diff --git a/cli/tests/testdata/062_permissions_request_global.ts b/cli/tests/testdata/run/062_permissions_request_global.ts
index e431bc31b..e431bc31b 100644
--- a/cli/tests/testdata/062_permissions_request_global.ts
+++ b/cli/tests/testdata/run/062_permissions_request_global.ts
diff --git a/cli/tests/testdata/063_permissions_revoke.ts b/cli/tests/testdata/run/063_permissions_revoke.ts
index a81eee7cb..a81eee7cb 100644
--- a/cli/tests/testdata/063_permissions_revoke.ts
+++ b/cli/tests/testdata/run/063_permissions_revoke.ts
diff --git a/cli/tests/testdata/063_permissions_revoke.ts.out b/cli/tests/testdata/run/063_permissions_revoke.ts.out
index bbd64c557..bbd64c557 100644
--- a/cli/tests/testdata/063_permissions_revoke.ts.out
+++ b/cli/tests/testdata/run/063_permissions_revoke.ts.out
diff --git a/cli/tests/testdata/064_permissions_revoke_global.ts b/cli/tests/testdata/run/064_permissions_revoke_global.ts
index a9b1fcd40..a9b1fcd40 100644
--- a/cli/tests/testdata/064_permissions_revoke_global.ts
+++ b/cli/tests/testdata/run/064_permissions_revoke_global.ts
diff --git a/cli/tests/testdata/064_permissions_revoke_global.ts.out b/cli/tests/testdata/run/064_permissions_revoke_global.ts.out
index f7e389a76..f7e389a76 100644
--- a/cli/tests/testdata/064_permissions_revoke_global.ts.out
+++ b/cli/tests/testdata/run/064_permissions_revoke_global.ts.out
diff --git a/cli/tests/testdata/066_prompt.ts b/cli/tests/testdata/run/066_prompt.ts
index e3daa7ac0..e3daa7ac0 100644
--- a/cli/tests/testdata/066_prompt.ts
+++ b/cli/tests/testdata/run/066_prompt.ts
diff --git a/cli/tests/testdata/070_location.ts b/cli/tests/testdata/run/070_location.ts
index 05e5abdf1..05e5abdf1 100644
--- a/cli/tests/testdata/070_location.ts
+++ b/cli/tests/testdata/run/070_location.ts
diff --git a/cli/tests/testdata/070_location.ts.out b/cli/tests/testdata/run/070_location.ts.out
index 692d7c976..692d7c976 100644
--- a/cli/tests/testdata/070_location.ts.out
+++ b/cli/tests/testdata/run/070_location.ts.out
diff --git a/cli/tests/testdata/071_location_unset.ts b/cli/tests/testdata/run/071_location_unset.ts
index f560d2716..f560d2716 100644
--- a/cli/tests/testdata/071_location_unset.ts
+++ b/cli/tests/testdata/run/071_location_unset.ts
diff --git a/cli/tests/testdata/071_location_unset.ts.out b/cli/tests/testdata/run/071_location_unset.ts.out
index 99f87a7fc..99f87a7fc 100644
--- a/cli/tests/testdata/071_location_unset.ts.out
+++ b/cli/tests/testdata/run/071_location_unset.ts.out
diff --git a/cli/tests/testdata/run/072_location_relative_fetch.ts b/cli/tests/testdata/run/072_location_relative_fetch.ts
new file mode 100644
index 000000000..b2a291693
--- /dev/null
+++ b/cli/tests/testdata/run/072_location_relative_fetch.ts
@@ -0,0 +1,2 @@
+const response = await fetch("run/fetch/hello.txt");
+console.log(await response.text());
diff --git a/cli/tests/testdata/072_location_relative_fetch.ts.out b/cli/tests/testdata/run/072_location_relative_fetch.ts.out
index 8151f6f88..8151f6f88 100644
--- a/cli/tests/testdata/072_location_relative_fetch.ts.out
+++ b/cli/tests/testdata/run/072_location_relative_fetch.ts.out
diff --git a/cli/tests/testdata/075_import_local_query_hash.ts b/cli/tests/testdata/run/075_import_local_query_hash.ts
index 99c7ceab4..99c7ceab4 100644
--- a/cli/tests/testdata/075_import_local_query_hash.ts
+++ b/cli/tests/testdata/run/075_import_local_query_hash.ts
diff --git a/cli/tests/testdata/075_import_local_query_hash.ts.out b/cli/tests/testdata/run/075_import_local_query_hash.ts.out
index 340777742..340777742 100644
--- a/cli/tests/testdata/075_import_local_query_hash.ts.out
+++ b/cli/tests/testdata/run/075_import_local_query_hash.ts.out
diff --git a/cli/tests/testdata/077_fetch_empty.ts b/cli/tests/testdata/run/077_fetch_empty.ts
index b10a9094e..b10a9094e 100644
--- a/cli/tests/testdata/077_fetch_empty.ts
+++ b/cli/tests/testdata/run/077_fetch_empty.ts
diff --git a/cli/tests/testdata/077_fetch_empty.ts.out b/cli/tests/testdata/run/077_fetch_empty.ts.out
index e546cfcec..e546cfcec 100644
--- a/cli/tests/testdata/077_fetch_empty.ts.out
+++ b/cli/tests/testdata/run/077_fetch_empty.ts.out
diff --git a/cli/tests/testdata/078_unload_on_exit.ts b/cli/tests/testdata/run/078_unload_on_exit.ts
index 43d33eb25..43d33eb25 100644
--- a/cli/tests/testdata/078_unload_on_exit.ts
+++ b/cli/tests/testdata/run/078_unload_on_exit.ts
diff --git a/cli/tests/testdata/078_unload_on_exit.ts.out b/cli/tests/testdata/run/078_unload_on_exit.ts.out
index e213f9632..e213f9632 100644
--- a/cli/tests/testdata/078_unload_on_exit.ts.out
+++ b/cli/tests/testdata/run/078_unload_on_exit.ts.out
diff --git a/cli/tests/testdata/079_location_authentication.ts b/cli/tests/testdata/run/079_location_authentication.ts
index 4989312ac..4989312ac 100644
--- a/cli/tests/testdata/079_location_authentication.ts
+++ b/cli/tests/testdata/run/079_location_authentication.ts
diff --git a/cli/tests/testdata/079_location_authentication.ts.out b/cli/tests/testdata/run/079_location_authentication.ts.out
index bb2458497..bb2458497 100644
--- a/cli/tests/testdata/079_location_authentication.ts.out
+++ b/cli/tests/testdata/run/079_location_authentication.ts.out
diff --git a/cli/tests/testdata/081_location_relative_fetch_redirect.ts b/cli/tests/testdata/run/081_location_relative_fetch_redirect.ts
index 742ef0afb..742ef0afb 100644
--- a/cli/tests/testdata/081_location_relative_fetch_redirect.ts
+++ b/cli/tests/testdata/run/081_location_relative_fetch_redirect.ts
diff --git a/cli/tests/testdata/081_location_relative_fetch_redirect.ts.out b/cli/tests/testdata/run/081_location_relative_fetch_redirect.ts.out
index f62b93195..f62b93195 100644
--- a/cli/tests/testdata/081_location_relative_fetch_redirect.ts.out
+++ b/cli/tests/testdata/run/081_location_relative_fetch_redirect.ts.out
diff --git a/cli/tests/testdata/082_prepare_stack_trace_throw.js b/cli/tests/testdata/run/082_prepare_stack_trace_throw.js
index 8137bfdc8..8137bfdc8 100644
--- a/cli/tests/testdata/082_prepare_stack_trace_throw.js
+++ b/cli/tests/testdata/run/082_prepare_stack_trace_throw.js
diff --git a/cli/tests/testdata/082_prepare_stack_trace_throw.js.out b/cli/tests/testdata/run/082_prepare_stack_trace_throw.js.out
index 751b7c971..751b7c971 100644
--- a/cli/tests/testdata/082_prepare_stack_trace_throw.js.out
+++ b/cli/tests/testdata/run/082_prepare_stack_trace_throw.js.out
diff --git a/cli/tests/testdata/083_legacy_external_source_map.ts b/cli/tests/testdata/run/083_legacy_external_source_map.ts
index 73d267b87..73d267b87 100644
--- a/cli/tests/testdata/083_legacy_external_source_map.ts
+++ b/cli/tests/testdata/run/083_legacy_external_source_map.ts
diff --git a/cli/tests/testdata/088_dynamic_import_already_evaluating.ts b/cli/tests/testdata/run/088_dynamic_import_already_evaluating.ts
index 272163a5d..272163a5d 100644
--- a/cli/tests/testdata/088_dynamic_import_already_evaluating.ts
+++ b/cli/tests/testdata/run/088_dynamic_import_already_evaluating.ts
diff --git a/cli/tests/testdata/088_dynamic_import_already_evaluating.ts.out b/cli/tests/testdata/run/088_dynamic_import_already_evaluating.ts.out
index a36dd11e7..a36dd11e7 100644
--- a/cli/tests/testdata/088_dynamic_import_already_evaluating.ts.out
+++ b/cli/tests/testdata/run/088_dynamic_import_already_evaluating.ts.out
diff --git a/cli/tests/testdata/088_dynamic_import_target.ts b/cli/tests/testdata/run/088_dynamic_import_target.ts
index 226f1851a..226f1851a 100644
--- a/cli/tests/testdata/088_dynamic_import_target.ts
+++ b/cli/tests/testdata/run/088_dynamic_import_target.ts
diff --git a/cli/tests/testdata/089_run_allow_list.ts b/cli/tests/testdata/run/089_run_allow_list.ts
index d7bc8e195..d7bc8e195 100644
--- a/cli/tests/testdata/089_run_allow_list.ts
+++ b/cli/tests/testdata/run/089_run_allow_list.ts
diff --git a/cli/tests/testdata/089_run_allow_list.ts.out b/cli/tests/testdata/run/089_run_allow_list.ts.out
index 68a4a2ac5..68a4a2ac5 100644
--- a/cli/tests/testdata/089_run_allow_list.ts.out
+++ b/cli/tests/testdata/run/089_run_allow_list.ts.out
diff --git a/cli/tests/testdata/090_run_permissions_request.ts b/cli/tests/testdata/run/090_run_permissions_request.ts
index 8ecad2b3b..8ecad2b3b 100644
--- a/cli/tests/testdata/090_run_permissions_request.ts
+++ b/cli/tests/testdata/run/090_run_permissions_request.ts
diff --git a/cli/tests/testdata/091_use_define_for_class_fields.ts b/cli/tests/testdata/run/091_use_define_for_class_fields.ts
index 46be3ac0b..46be3ac0b 100644
--- a/cli/tests/testdata/091_use_define_for_class_fields.ts
+++ b/cli/tests/testdata/run/091_use_define_for_class_fields.ts
diff --git a/cli/tests/testdata/091_use_define_for_class_fields.ts.out b/cli/tests/testdata/run/091_use_define_for_class_fields.ts.out
index 08f94a967..08f94a967 100644
--- a/cli/tests/testdata/091_use_define_for_class_fields.ts.out
+++ b/cli/tests/testdata/run/091_use_define_for_class_fields.ts.out
diff --git a/cli/tests/testdata/092_import_map_unmapped_bare_specifier.ts b/cli/tests/testdata/run/092_import_map_unmapped_bare_specifier.ts
index 87684430d..87684430d 100644
--- a/cli/tests/testdata/092_import_map_unmapped_bare_specifier.ts
+++ b/cli/tests/testdata/run/092_import_map_unmapped_bare_specifier.ts
diff --git a/cli/tests/testdata/092_import_map_unmapped_bare_specifier.ts.out b/cli/tests/testdata/run/092_import_map_unmapped_bare_specifier.ts.out
index 6e82ad410..6e82ad410 100644
--- a/cli/tests/testdata/092_import_map_unmapped_bare_specifier.ts.out
+++ b/cli/tests/testdata/run/092_import_map_unmapped_bare_specifier.ts.out
diff --git a/cli/tests/testdata/aggregate_error.out b/cli/tests/testdata/run/aggregate_error.out
index 7d0c09c70..7d0c09c70 100644
--- a/cli/tests/testdata/aggregate_error.out
+++ b/cli/tests/testdata/run/aggregate_error.out
diff --git a/cli/tests/testdata/aggregate_error.ts b/cli/tests/testdata/run/aggregate_error.ts
index ce4b54376..ce4b54376 100644
--- a/cli/tests/testdata/aggregate_error.ts
+++ b/cli/tests/testdata/run/aggregate_error.ts
diff --git a/cli/tests/testdata/async_error.ts b/cli/tests/testdata/run/async_error.ts
index b55c73aeb..b55c73aeb 100644
--- a/cli/tests/testdata/async_error.ts
+++ b/cli/tests/testdata/run/async_error.ts
diff --git a/cli/tests/testdata/async_error.ts.out b/cli/tests/testdata/run/async_error.ts.out
index b424f9072..b424f9072 100644
--- a/cli/tests/testdata/async_error.ts.out
+++ b/cli/tests/testdata/run/async_error.ts.out
diff --git a/cli/tests/testdata/before_unload.js b/cli/tests/testdata/run/before_unload.js
index 2572e512b..2572e512b 100644
--- a/cli/tests/testdata/before_unload.js
+++ b/cli/tests/testdata/run/before_unload.js
diff --git a/cli/tests/testdata/before_unload.js.out b/cli/tests/testdata/run/before_unload.js.out
index f1f2ab49a..f1f2ab49a 100644
--- a/cli/tests/testdata/before_unload.js.out
+++ b/cli/tests/testdata/run/before_unload.js.out
diff --git a/cli/tests/testdata/blob_gc_finalization.js b/cli/tests/testdata/run/blob_gc_finalization.js
index c721e6b45..c721e6b45 100644
--- a/cli/tests/testdata/blob_gc_finalization.js
+++ b/cli/tests/testdata/run/blob_gc_finalization.js
diff --git a/cli/tests/testdata/blob_gc_finalization.js.out b/cli/tests/testdata/run/blob_gc_finalization.js.out
index dcc4500f8..dcc4500f8 100644
--- a/cli/tests/testdata/blob_gc_finalization.js.out
+++ b/cli/tests/testdata/run/blob_gc_finalization.js.out
diff --git a/cli/tests/testdata/byte_order_mark.out b/cli/tests/testdata/run/byte_order_mark.out
index 557db03de..557db03de 100644
--- a/cli/tests/testdata/byte_order_mark.out
+++ b/cli/tests/testdata/run/byte_order_mark.out
diff --git a/cli/tests/testdata/byte_order_mark.ts b/cli/tests/testdata/run/byte_order_mark.ts
index 40eb23c1d..40eb23c1d 100644
--- a/cli/tests/testdata/byte_order_mark.ts
+++ b/cli/tests/testdata/run/byte_order_mark.ts
diff --git a/cli/tests/testdata/checkjs.tsconfig.json b/cli/tests/testdata/run/checkjs.tsconfig.json
index 46d96db9e..46d96db9e 100644
--- a/cli/tests/testdata/checkjs.tsconfig.json
+++ b/cli/tests/testdata/run/checkjs.tsconfig.json
diff --git a/cli/tests/testdata/commonjs.cjs b/cli/tests/testdata/run/cjs_imports/commonjs.cjs
index 7df7d571e..7df7d571e 100644
--- a/cli/tests/testdata/commonjs.cjs
+++ b/cli/tests/testdata/run/cjs_imports/commonjs.cjs
diff --git a/cli/tests/testdata/cjs_imports.ts.out b/cli/tests/testdata/run/cjs_imports/main.out
index 557db03de..557db03de 100644
--- a/cli/tests/testdata/cjs_imports.ts.out
+++ b/cli/tests/testdata/run/cjs_imports/main.out
diff --git a/cli/tests/testdata/cjs_imports.ts b/cli/tests/testdata/run/cjs_imports/main.ts
index d8b77c22e..d8b77c22e 100644
--- a/cli/tests/testdata/cjs_imports.ts
+++ b/cli/tests/testdata/run/cjs_imports/main.ts
diff --git a/cli/tests/testdata/classic_workers_event_loop.js b/cli/tests/testdata/run/classic_workers_event_loop.js
index 810a6df7f..810a6df7f 100644
--- a/cli/tests/testdata/classic_workers_event_loop.js
+++ b/cli/tests/testdata/run/classic_workers_event_loop.js
diff --git a/cli/tests/testdata/classic_workers_event_loop.js.out b/cli/tests/testdata/run/classic_workers_event_loop.js.out
index 19f86f493..19f86f493 100644
--- a/cli/tests/testdata/classic_workers_event_loop.js.out
+++ b/cli/tests/testdata/run/classic_workers_event_loop.js.out
diff --git a/cli/tests/testdata/colors_without_globalThis.js b/cli/tests/testdata/run/colors_without_globalThis.js
index f9d4b68fc..f9d4b68fc 100644
--- a/cli/tests/testdata/colors_without_globalThis.js
+++ b/cli/tests/testdata/run/colors_without_globalThis.js
diff --git a/cli/tests/testdata/complex_error.ts b/cli/tests/testdata/run/complex_error.ts
index b462992ac..b462992ac 100644
--- a/cli/tests/testdata/complex_error.ts
+++ b/cli/tests/testdata/run/complex_error.ts
diff --git a/cli/tests/testdata/complex_error.ts.out b/cli/tests/testdata/run/complex_error.ts.out
index eef1b7699..eef1b7699 100644
--- a/cli/tests/testdata/complex_error.ts.out
+++ b/cli/tests/testdata/run/complex_error.ts.out
diff --git a/cli/tests/testdata/complex_permissions_test.ts b/cli/tests/testdata/run/complex_permissions_test.ts
index bae157246..bae157246 100644
--- a/cli/tests/testdata/complex_permissions_test.ts
+++ b/cli/tests/testdata/run/complex_permissions_test.ts
diff --git a/cli/tests/testdata/run/config/main.out b/cli/tests/testdata/run/config/main.out
new file mode 100644
index 000000000..277314807
--- /dev/null
+++ b/cli/tests/testdata/run/config/main.out
@@ -0,0 +1,4 @@
+[WILDCARD]Unsupported compiler options in "[WILDCARD]tsconfig.json".
+ The following options were ignored:
+ module, target
+Check [WILDCARD]/main.ts
diff --git a/cli/tests/testdata/config.ts b/cli/tests/testdata/run/config/main.ts
index 51a61e447..51a61e447 100644
--- a/cli/tests/testdata/config.ts
+++ b/cli/tests/testdata/run/config/main.ts
diff --git a/cli/tests/testdata/config.tsconfig.json b/cli/tests/testdata/run/config/tsconfig.json
index 0f0881920..0f0881920 100644
--- a/cli/tests/testdata/config.tsconfig.json
+++ b/cli/tests/testdata/run/config/tsconfig.json
diff --git a/cli/tests/testdata/run/config_json_import.ts b/cli/tests/testdata/run/config_json_import.ts
new file mode 100644
index 000000000..9cf1cceaa
--- /dev/null
+++ b/cli/tests/testdata/run/config_json_import.ts
@@ -0,0 +1,2 @@
+import config from "../jsx/deno-jsx.json" assert { type: "json" };
+console.log(config);
diff --git a/cli/tests/testdata/config_json_import.ts.out b/cli/tests/testdata/run/config_json_import.ts.out
index aa55be7d5..aa55be7d5 100644
--- a/cli/tests/testdata/config_json_import.ts.out
+++ b/cli/tests/testdata/run/config_json_import.ts.out
diff --git a/cli/tests/testdata/config_types.ts.out b/cli/tests/testdata/run/config_types/main.out
index 417b7b537..417b7b537 100644
--- a/cli/tests/testdata/config_types.ts.out
+++ b/cli/tests/testdata/run/config_types/main.out
diff --git a/cli/tests/testdata/config_types.ts b/cli/tests/testdata/run/config_types/main.ts
index f1a8d6583..f1a8d6583 100644
--- a/cli/tests/testdata/config_types.ts
+++ b/cli/tests/testdata/run/config_types/main.ts
diff --git a/cli/tests/testdata/run/config_types/remote.tsconfig.json b/cli/tests/testdata/run/config_types/remote.tsconfig.json
new file mode 100644
index 000000000..255ff5def
--- /dev/null
+++ b/cli/tests/testdata/run/config_types/remote.tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "compilerOptions": {
+ "types": [
+ "http://localhost:4545/run/config_types/types.d.ts"
+ ]
+ }
+}
diff --git a/cli/tests/testdata/config_types.tsconfig.json b/cli/tests/testdata/run/config_types/tsconfig.json
index 3810d4534..85f1549e0 100644
--- a/cli/tests/testdata/config_types.tsconfig.json
+++ b/cli/tests/testdata/run/config_types/tsconfig.json
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"types": [
- "./subdir/types.d.ts"
+ "./types.d.ts"
]
}
}
diff --git a/cli/tests/testdata/subdir/types.d.ts b/cli/tests/testdata/run/config_types/types.d.ts
index 536a6d0a6..536a6d0a6 100644
--- a/cli/tests/testdata/subdir/types.d.ts
+++ b/cli/tests/testdata/run/config_types/types.d.ts
diff --git a/cli/tests/testdata/custom_inspect_url.js b/cli/tests/testdata/run/custom_inspect_url.js
index 69aa2dc49..69aa2dc49 100644
--- a/cli/tests/testdata/custom_inspect_url.js
+++ b/cli/tests/testdata/run/custom_inspect_url.js
diff --git a/cli/tests/testdata/custom_inspect_url.js.out b/cli/tests/testdata/run/custom_inspect_url.js.out
index 1c714e34e..1c714e34e 100644
--- a/cli/tests/testdata/custom_inspect_url.js.out
+++ b/cli/tests/testdata/run/custom_inspect_url.js.out
diff --git a/cli/tests/testdata/delete_window.js b/cli/tests/testdata/run/delete_window.js
index f2f16820d..f2f16820d 100644
--- a/cli/tests/testdata/delete_window.js
+++ b/cli/tests/testdata/run/delete_window.js
diff --git a/cli/tests/testdata/deno_exit_tampering.ts b/cli/tests/testdata/run/deno_exit_tampering.ts
index 3b24261e2..3b24261e2 100644
--- a/cli/tests/testdata/deno_exit_tampering.ts
+++ b/cli/tests/testdata/run/deno_exit_tampering.ts
diff --git a/cli/tests/testdata/disallow_http_from_https.js b/cli/tests/testdata/run/disallow_http_from_https.js
index bff407b5e..b8ddff170 100644
--- a/cli/tests/testdata/disallow_http_from_https.js
+++ b/cli/tests/testdata/run/disallow_http_from_https.js
@@ -1,2 +1,2 @@
// Trying to import "http://", while this file is accessed by "https://"
-import "http://localhost:4545/001_hello.js";
+import "http://localhost:4545/run/001_hello.js";
diff --git a/cli/tests/testdata/disallow_http_from_https.ts b/cli/tests/testdata/run/disallow_http_from_https.ts
index bff407b5e..b8ddff170 100644
--- a/cli/tests/testdata/disallow_http_from_https.ts
+++ b/cli/tests/testdata/run/disallow_http_from_https.ts
@@ -1,2 +1,2 @@
// Trying to import "http://", while this file is accessed by "https://"
-import "http://localhost:4545/001_hello.js";
+import "http://localhost:4545/run/001_hello.js";
diff --git a/cli/tests/testdata/run/disallow_http_from_https_js.out b/cli/tests/testdata/run/disallow_http_from_https_js.out
new file mode 100644
index 000000000..5dc327975
--- /dev/null
+++ b/cli/tests/testdata/run/disallow_http_from_https_js.out
@@ -0,0 +1,3 @@
+error: Modules imported via https are not allowed to import http modules.
+ Importing: http://localhost:4545/run/001_hello.js
+ at https://localhost:5545/run/disallow_http_from_https.js:2:8
diff --git a/cli/tests/testdata/run/disallow_http_from_https_ts.out b/cli/tests/testdata/run/disallow_http_from_https_ts.out
new file mode 100644
index 000000000..e3b8f4390
--- /dev/null
+++ b/cli/tests/testdata/run/disallow_http_from_https_ts.out
@@ -0,0 +1,3 @@
+error: Modules imported via https are not allowed to import http modules.
+ Importing: http://localhost:4545/run/001_hello.js
+ at https://localhost:5545/run/disallow_http_from_https.ts:2:8
diff --git a/cli/tests/testdata/dom_exception_formatting.ts b/cli/tests/testdata/run/dom_exception_formatting.ts
index 0209ec81e..0209ec81e 100644
--- a/cli/tests/testdata/dom_exception_formatting.ts
+++ b/cli/tests/testdata/run/dom_exception_formatting.ts
diff --git a/cli/tests/testdata/dom_exception_formatting.ts.out b/cli/tests/testdata/run/dom_exception_formatting.ts.out
index bcdd714ea..bcdd714ea 100644
--- a/cli/tests/testdata/dom_exception_formatting.ts.out
+++ b/cli/tests/testdata/run/dom_exception_formatting.ts.out
diff --git a/cli/tests/testdata/error_001.ts b/cli/tests/testdata/run/dynamic_import_already_rejected/error_001.ts
index b01068bc0..b01068bc0 100644
--- a/cli/tests/testdata/error_001.ts
+++ b/cli/tests/testdata/run/dynamic_import_already_rejected/error_001.ts
diff --git a/cli/tests/testdata/086_dynamic_import_already_rejected.ts.out b/cli/tests/testdata/run/dynamic_import_already_rejected/main.out
index c3eb66f9e..c3eb66f9e 100644
--- a/cli/tests/testdata/086_dynamic_import_already_rejected.ts.out
+++ b/cli/tests/testdata/run/dynamic_import_already_rejected/main.out
diff --git a/cli/tests/testdata/086_dynamic_import_already_rejected.ts b/cli/tests/testdata/run/dynamic_import_already_rejected/main.ts
index 249de8d8b..249de8d8b 100644
--- a/cli/tests/testdata/086_dynamic_import_already_rejected.ts
+++ b/cli/tests/testdata/run/dynamic_import_already_rejected/main.ts
diff --git a/cli/tests/testdata/delayed_error.ts b/cli/tests/testdata/run/dynamic_import_async_error/delayed_error.ts
index 76057e627..76057e627 100644
--- a/cli/tests/testdata/delayed_error.ts
+++ b/cli/tests/testdata/run/dynamic_import_async_error/delayed_error.ts
diff --git a/cli/tests/testdata/085_dynamic_import_async_error.ts.out b/cli/tests/testdata/run/dynamic_import_async_error/main.out
index 974c2e426..974c2e426 100644
--- a/cli/tests/testdata/085_dynamic_import_async_error.ts.out
+++ b/cli/tests/testdata/run/dynamic_import_async_error/main.out
diff --git a/cli/tests/testdata/085_dynamic_import_async_error.ts b/cli/tests/testdata/run/dynamic_import_async_error/main.ts
index 998e7ed3e..998e7ed3e 100644
--- a/cli/tests/testdata/085_dynamic_import_async_error.ts
+++ b/cli/tests/testdata/run/dynamic_import_async_error/main.ts
diff --git a/cli/tests/testdata/dynamic_import_conditional.js b/cli/tests/testdata/run/dynamic_import_conditional.js
index 1b4193e3e..1b4193e3e 100644
--- a/cli/tests/testdata/dynamic_import_conditional.js
+++ b/cli/tests/testdata/run/dynamic_import_conditional.js
diff --git a/cli/tests/testdata/dynamic_import_conditional.js.out b/cli/tests/testdata/run/dynamic_import_conditional.js.out
index 27ba77dda..27ba77dda 100644
--- a/cli/tests/testdata/dynamic_import_conditional.js.out
+++ b/cli/tests/testdata/run/dynamic_import_conditional.js.out
diff --git a/cli/tests/testdata/subdir/empty.ts b/cli/tests/testdata/run/empty.ts
index e69de29bb..e69de29bb 100644
--- a/cli/tests/testdata/subdir/empty.ts
+++ b/cli/tests/testdata/run/empty.ts
diff --git a/cli/tests/testdata/run/error_001.ts b/cli/tests/testdata/run/error_001.ts
new file mode 100644
index 000000000..b01068bc0
--- /dev/null
+++ b/cli/tests/testdata/run/error_001.ts
@@ -0,0 +1,9 @@
+function foo(): never {
+ throw Error("bad");
+}
+
+function bar() {
+ foo();
+}
+
+bar();
diff --git a/cli/tests/testdata/error_001.ts.out b/cli/tests/testdata/run/error_001.ts.out
index 25664a9a4..25664a9a4 100644
--- a/cli/tests/testdata/error_001.ts.out
+++ b/cli/tests/testdata/run/error_001.ts.out
diff --git a/cli/tests/testdata/run/error_002.ts b/cli/tests/testdata/run/error_002.ts
new file mode 100644
index 000000000..5f8179bbe
--- /dev/null
+++ b/cli/tests/testdata/run/error_002.ts
@@ -0,0 +1,7 @@
+import { throwsError } from "../subdir/mod1.ts";
+
+function foo() {
+ throwsError();
+}
+
+foo();
diff --git a/cli/tests/testdata/error_002.ts.out b/cli/tests/testdata/run/error_002.ts.out
index 96b9e602a..96b9e602a 100644
--- a/cli/tests/testdata/error_002.ts.out
+++ b/cli/tests/testdata/run/error_002.ts.out
diff --git a/cli/tests/testdata/error_003_typescript.ts b/cli/tests/testdata/run/error_003_typescript.ts
index e1f882123..e1f882123 100644
--- a/cli/tests/testdata/error_003_typescript.ts
+++ b/cli/tests/testdata/run/error_003_typescript.ts
diff --git a/cli/tests/testdata/error_003_typescript.ts.out b/cli/tests/testdata/run/error_003_typescript.ts.out
index bbb2ec470..bbb2ec470 100644
--- a/cli/tests/testdata/error_003_typescript.ts.out
+++ b/cli/tests/testdata/run/error_003_typescript.ts.out
diff --git a/cli/tests/testdata/error_004_missing_module.ts b/cli/tests/testdata/run/error_004_missing_module.ts
index 82b281181..82b281181 100644
--- a/cli/tests/testdata/error_004_missing_module.ts
+++ b/cli/tests/testdata/run/error_004_missing_module.ts
diff --git a/cli/tests/testdata/error_004_missing_module.ts.out b/cli/tests/testdata/run/error_004_missing_module.ts.out
index 9a2cfb8a8..9a2cfb8a8 100644
--- a/cli/tests/testdata/error_004_missing_module.ts.out
+++ b/cli/tests/testdata/run/error_004_missing_module.ts.out
diff --git a/cli/tests/testdata/error_005_missing_dynamic_import.ts b/cli/tests/testdata/run/error_005_missing_dynamic_import.ts
index 8ea8ff94e..8ea8ff94e 100644
--- a/cli/tests/testdata/error_005_missing_dynamic_import.ts
+++ b/cli/tests/testdata/run/error_005_missing_dynamic_import.ts
diff --git a/cli/tests/testdata/error_005_missing_dynamic_import.ts.out b/cli/tests/testdata/run/error_005_missing_dynamic_import.ts.out
index 55e4a8524..55e4a8524 100644
--- a/cli/tests/testdata/error_005_missing_dynamic_import.ts.out
+++ b/cli/tests/testdata/run/error_005_missing_dynamic_import.ts.out
diff --git a/cli/tests/testdata/error_006_import_ext_failure.ts b/cli/tests/testdata/run/error_006_import_ext_failure.ts
index 3c32303a3..3c32303a3 100644
--- a/cli/tests/testdata/error_006_import_ext_failure.ts
+++ b/cli/tests/testdata/run/error_006_import_ext_failure.ts
diff --git a/cli/tests/testdata/error_006_import_ext_failure.ts.out b/cli/tests/testdata/run/error_006_import_ext_failure.ts.out
index 667579bd8..667579bd8 100644
--- a/cli/tests/testdata/error_006_import_ext_failure.ts.out
+++ b/cli/tests/testdata/run/error_006_import_ext_failure.ts.out
diff --git a/cli/tests/testdata/error_007_any.ts b/cli/tests/testdata/run/error_007_any.ts
index bfef1289b..bfef1289b 100644
--- a/cli/tests/testdata/error_007_any.ts
+++ b/cli/tests/testdata/run/error_007_any.ts
diff --git a/cli/tests/testdata/error_007_any.ts.out b/cli/tests/testdata/run/error_007_any.ts.out
index b93ceb1d0..b93ceb1d0 100644
--- a/cli/tests/testdata/error_007_any.ts.out
+++ b/cli/tests/testdata/run/error_007_any.ts.out
diff --git a/cli/tests/testdata/error_008_checkjs.js b/cli/tests/testdata/run/error_008_checkjs.js
index f0856d94c..f0856d94c 100644
--- a/cli/tests/testdata/error_008_checkjs.js
+++ b/cli/tests/testdata/run/error_008_checkjs.js
diff --git a/cli/tests/testdata/error_008_checkjs.js.out b/cli/tests/testdata/run/error_008_checkjs.js.out
index e43187382..e43187382 100644
--- a/cli/tests/testdata/error_008_checkjs.js.out
+++ b/cli/tests/testdata/run/error_008_checkjs.js.out
diff --git a/cli/tests/testdata/error_009_extensions_error.js b/cli/tests/testdata/run/error_009_extensions_error.js
index 01b97ea38..01b97ea38 100644
--- a/cli/tests/testdata/error_009_extensions_error.js
+++ b/cli/tests/testdata/run/error_009_extensions_error.js
diff --git a/cli/tests/testdata/error_009_extensions_error.js.out b/cli/tests/testdata/run/error_009_extensions_error.js.out
index 8510980f6..8510980f6 100644
--- a/cli/tests/testdata/error_009_extensions_error.js.out
+++ b/cli/tests/testdata/run/error_009_extensions_error.js.out
diff --git a/cli/tests/testdata/error_009_missing_js_module.disabled b/cli/tests/testdata/run/error_009_missing_js_module.disabled
index 3156fc94b..3156fc94b 100644
--- a/cli/tests/testdata/error_009_missing_js_module.disabled
+++ b/cli/tests/testdata/run/error_009_missing_js_module.disabled
diff --git a/cli/tests/testdata/error_011_bad_module_specifier.ts b/cli/tests/testdata/run/error_011_bad_module_specifier.ts
index 1c57e37a5..1c57e37a5 100644
--- a/cli/tests/testdata/error_011_bad_module_specifier.ts
+++ b/cli/tests/testdata/run/error_011_bad_module_specifier.ts
diff --git a/cli/tests/testdata/error_011_bad_module_specifier.ts.out b/cli/tests/testdata/run/error_011_bad_module_specifier.ts.out
index 81be915d1..81be915d1 100644
--- a/cli/tests/testdata/error_011_bad_module_specifier.ts.out
+++ b/cli/tests/testdata/run/error_011_bad_module_specifier.ts.out
diff --git a/cli/tests/testdata/error_012_bad_dynamic_import_specifier.ts b/cli/tests/testdata/run/error_012_bad_dynamic_import_specifier.ts
index 5f39f407c..5f39f407c 100644
--- a/cli/tests/testdata/error_012_bad_dynamic_import_specifier.ts
+++ b/cli/tests/testdata/run/error_012_bad_dynamic_import_specifier.ts
diff --git a/cli/tests/testdata/error_012_bad_dynamic_import_specifier.ts.out b/cli/tests/testdata/run/error_012_bad_dynamic_import_specifier.ts.out
index 7acd66713..7acd66713 100644
--- a/cli/tests/testdata/error_012_bad_dynamic_import_specifier.ts.out
+++ b/cli/tests/testdata/run/error_012_bad_dynamic_import_specifier.ts.out
diff --git a/cli/tests/testdata/error_013_missing_script.out b/cli/tests/testdata/run/error_013_missing_script.out
index 7ee268de4..7ee268de4 100644
--- a/cli/tests/testdata/error_013_missing_script.out
+++ b/cli/tests/testdata/run/error_013_missing_script.out
diff --git a/cli/tests/testdata/error_014_catch_dynamic_import_error.js b/cli/tests/testdata/run/error_014_catch_dynamic_import_error.js
index 483be7b1a..c58e54dcb 100644
--- a/cli/tests/testdata/error_014_catch_dynamic_import_error.js
+++ b/cli/tests/testdata/run/error_014_catch_dynamic_import_error.js
@@ -7,21 +7,21 @@
}
try {
- await import("./subdir/indirect_import_error.js");
+ await import("../subdir/indirect_import_error.js");
} catch (err) {
console.log("Caught indirect direct dynamic import error.");
console.log(err);
}
try {
- await import("./subdir/throws.js");
+ await import("../subdir/throws.js");
} catch (err) {
console.log("Caught error thrown by dynamically imported module.");
console.log(err);
}
try {
- await import("./subdir/indirect_throws.js");
+ await import("../subdir/indirect_throws.js");
} catch (err) {
console.log(
"Caught error thrown indirectly by dynamically imported module.",
diff --git a/cli/tests/testdata/error_014_catch_dynamic_import_error.js.out b/cli/tests/testdata/run/error_014_catch_dynamic_import_error.js.out
index 701ddc3b5..701ddc3b5 100644
--- a/cli/tests/testdata/error_014_catch_dynamic_import_error.js.out
+++ b/cli/tests/testdata/run/error_014_catch_dynamic_import_error.js.out
diff --git a/cli/tests/testdata/error_015_dynamic_import_permissions.js b/cli/tests/testdata/run/error_015_dynamic_import_permissions.js
index 73da56fd8..73da56fd8 100644
--- a/cli/tests/testdata/error_015_dynamic_import_permissions.js
+++ b/cli/tests/testdata/run/error_015_dynamic_import_permissions.js
diff --git a/cli/tests/testdata/error_015_dynamic_import_permissions.out b/cli/tests/testdata/run/error_015_dynamic_import_permissions.out
index ef54f331b..ef54f331b 100644
--- a/cli/tests/testdata/error_015_dynamic_import_permissions.out
+++ b/cli/tests/testdata/run/error_015_dynamic_import_permissions.out
diff --git a/cli/tests/testdata/error_016_dynamic_import_permissions2.js b/cli/tests/testdata/run/error_016_dynamic_import_permissions2.js
index f018d4a2e..f018d4a2e 100644
--- a/cli/tests/testdata/error_016_dynamic_import_permissions2.js
+++ b/cli/tests/testdata/run/error_016_dynamic_import_permissions2.js
diff --git a/cli/tests/testdata/error_016_dynamic_import_permissions2.out b/cli/tests/testdata/run/error_016_dynamic_import_permissions2.out
index 710871f41..710871f41 100644
--- a/cli/tests/testdata/error_016_dynamic_import_permissions2.out
+++ b/cli/tests/testdata/run/error_016_dynamic_import_permissions2.out
diff --git a/cli/tests/testdata/error_017_hide_long_source_ts.ts b/cli/tests/testdata/run/error_017_hide_long_source_ts.ts
index d61cb1277..d61cb1277 100644
--- a/cli/tests/testdata/error_017_hide_long_source_ts.ts
+++ b/cli/tests/testdata/run/error_017_hide_long_source_ts.ts
diff --git a/cli/tests/testdata/error_017_hide_long_source_ts.ts.out b/cli/tests/testdata/run/error_017_hide_long_source_ts.ts.out
index 917061ab9..917061ab9 100644
--- a/cli/tests/testdata/error_017_hide_long_source_ts.ts.out
+++ b/cli/tests/testdata/run/error_017_hide_long_source_ts.ts.out
diff --git a/cli/tests/testdata/error_018_hide_long_source_js.js b/cli/tests/testdata/run/error_018_hide_long_source_js.js
index d61cb1277..d61cb1277 100644
--- a/cli/tests/testdata/error_018_hide_long_source_js.js
+++ b/cli/tests/testdata/run/error_018_hide_long_source_js.js
diff --git a/cli/tests/testdata/error_018_hide_long_source_js.js.out b/cli/tests/testdata/run/error_018_hide_long_source_js.js.out
index cc98669a7..cc98669a7 100644
--- a/cli/tests/testdata/error_018_hide_long_source_js.js.out
+++ b/cli/tests/testdata/run/error_018_hide_long_source_js.js.out
diff --git a/cli/tests/testdata/error_019_stack_function.ts b/cli/tests/testdata/run/error_019_stack_function.ts
index a6a69d146..a6a69d146 100644
--- a/cli/tests/testdata/error_019_stack_function.ts
+++ b/cli/tests/testdata/run/error_019_stack_function.ts
diff --git a/cli/tests/testdata/error_019_stack_function.ts.out b/cli/tests/testdata/run/error_019_stack_function.ts.out
index 03967d12b..03967d12b 100644
--- a/cli/tests/testdata/error_019_stack_function.ts.out
+++ b/cli/tests/testdata/run/error_019_stack_function.ts.out
diff --git a/cli/tests/testdata/error_020_stack_constructor.ts b/cli/tests/testdata/run/error_020_stack_constructor.ts
index 526d1a661..526d1a661 100644
--- a/cli/tests/testdata/error_020_stack_constructor.ts
+++ b/cli/tests/testdata/run/error_020_stack_constructor.ts
diff --git a/cli/tests/testdata/error_020_stack_constructor.ts.out b/cli/tests/testdata/run/error_020_stack_constructor.ts.out
index 01fdfb3c4..01fdfb3c4 100644
--- a/cli/tests/testdata/error_020_stack_constructor.ts.out
+++ b/cli/tests/testdata/run/error_020_stack_constructor.ts.out
diff --git a/cli/tests/testdata/error_021_stack_method.ts b/cli/tests/testdata/run/error_021_stack_method.ts
index b6ebe1f5e..b6ebe1f5e 100644
--- a/cli/tests/testdata/error_021_stack_method.ts
+++ b/cli/tests/testdata/run/error_021_stack_method.ts
diff --git a/cli/tests/testdata/error_021_stack_method.ts.out b/cli/tests/testdata/run/error_021_stack_method.ts.out
index 999f0aaa0..999f0aaa0 100644
--- a/cli/tests/testdata/error_021_stack_method.ts.out
+++ b/cli/tests/testdata/run/error_021_stack_method.ts.out
diff --git a/cli/tests/testdata/error_022_stack_custom_error.ts b/cli/tests/testdata/run/error_022_stack_custom_error.ts
index b95743503..b95743503 100644
--- a/cli/tests/testdata/error_022_stack_custom_error.ts
+++ b/cli/tests/testdata/run/error_022_stack_custom_error.ts
diff --git a/cli/tests/testdata/error_022_stack_custom_error.ts.out b/cli/tests/testdata/run/error_022_stack_custom_error.ts.out
index 78b0dcaea..78b0dcaea 100644
--- a/cli/tests/testdata/error_022_stack_custom_error.ts.out
+++ b/cli/tests/testdata/run/error_022_stack_custom_error.ts.out
diff --git a/cli/tests/testdata/error_023_stack_async.ts b/cli/tests/testdata/run/error_023_stack_async.ts
index fdabaa5df..fdabaa5df 100644
--- a/cli/tests/testdata/error_023_stack_async.ts
+++ b/cli/tests/testdata/run/error_023_stack_async.ts
diff --git a/cli/tests/testdata/error_023_stack_async.ts.out b/cli/tests/testdata/run/error_023_stack_async.ts.out
index 95f0eae64..95f0eae64 100644
--- a/cli/tests/testdata/error_023_stack_async.ts.out
+++ b/cli/tests/testdata/run/error_023_stack_async.ts.out
diff --git a/cli/tests/testdata/error_024_stack_promise_all.ts b/cli/tests/testdata/run/error_024_stack_promise_all.ts
index 8ca7b203c..8ca7b203c 100644
--- a/cli/tests/testdata/error_024_stack_promise_all.ts
+++ b/cli/tests/testdata/run/error_024_stack_promise_all.ts
diff --git a/cli/tests/testdata/error_024_stack_promise_all.ts.out b/cli/tests/testdata/run/error_024_stack_promise_all.ts.out
index 6cd88715c..6cd88715c 100644
--- a/cli/tests/testdata/error_024_stack_promise_all.ts.out
+++ b/cli/tests/testdata/run/error_024_stack_promise_all.ts.out
diff --git a/cli/tests/testdata/error_025_tab_indent b/cli/tests/testdata/run/error_025_tab_indent
index 35a25bcea..35a25bcea 100644
--- a/cli/tests/testdata/error_025_tab_indent
+++ b/cli/tests/testdata/run/error_025_tab_indent
diff --git a/cli/tests/testdata/error_025_tab_indent.out b/cli/tests/testdata/run/error_025_tab_indent.out
index f1466ce3f..f1466ce3f 100644
--- a/cli/tests/testdata/error_025_tab_indent.out
+++ b/cli/tests/testdata/run/error_025_tab_indent.out
diff --git a/cli/tests/testdata/run/error_026_remote_import_error.ts b/cli/tests/testdata/run/error_026_remote_import_error.ts
new file mode 100644
index 000000000..1b230d06b
--- /dev/null
+++ b/cli/tests/testdata/run/error_026_remote_import_error.ts
@@ -0,0 +1 @@
+import "http://localhost:4545/run/error_001.ts";
diff --git a/cli/tests/testdata/run/error_026_remote_import_error.ts.out b/cli/tests/testdata/run/error_026_remote_import_error.ts.out
new file mode 100644
index 000000000..84f926f24
--- /dev/null
+++ b/cli/tests/testdata/run/error_026_remote_import_error.ts.out
@@ -0,0 +1,7 @@
+[WILDCARD]error: Uncaught Error: bad
+ throw Error("bad");
+ ^
+ at foo (http://localhost:4545/run/error_001.ts:2:9)
+ at bar (http://localhost:4545/run/error_001.ts:6:3)
+ at http://localhost:4545/run/error_001.ts:9:1
+[WILDCARD]
diff --git a/cli/tests/testdata/error_cause.ts b/cli/tests/testdata/run/error_cause.ts
index 385ce2a03..385ce2a03 100644
--- a/cli/tests/testdata/error_cause.ts
+++ b/cli/tests/testdata/run/error_cause.ts
diff --git a/cli/tests/testdata/error_cause.ts.out b/cli/tests/testdata/run/error_cause.ts.out
index 2aab020d9..2aab020d9 100644
--- a/cli/tests/testdata/error_cause.ts.out
+++ b/cli/tests/testdata/run/error_cause.ts.out
diff --git a/cli/tests/testdata/error_cause_recursive.ts b/cli/tests/testdata/run/error_cause_recursive.ts
index a6999b1ff..a6999b1ff 100644
--- a/cli/tests/testdata/error_cause_recursive.ts
+++ b/cli/tests/testdata/run/error_cause_recursive.ts
diff --git a/cli/tests/testdata/error_cause_recursive.ts.out b/cli/tests/testdata/run/error_cause_recursive.ts.out
index ac729574d..ac729574d 100644
--- a/cli/tests/testdata/error_cause_recursive.ts.out
+++ b/cli/tests/testdata/run/error_cause_recursive.ts.out
diff --git a/cli/tests/testdata/error_for_await.ts b/cli/tests/testdata/run/error_for_await.ts
index 64c81abe4..64c81abe4 100644
--- a/cli/tests/testdata/error_for_await.ts
+++ b/cli/tests/testdata/run/error_for_await.ts
diff --git a/cli/tests/testdata/error_for_await.ts.out b/cli/tests/testdata/run/error_for_await.ts.out
index db3cdecb4..db3cdecb4 100644
--- a/cli/tests/testdata/error_for_await.ts.out
+++ b/cli/tests/testdata/run/error_for_await.ts.out
diff --git a/cli/tests/testdata/error_import_map_unable_to_load.out b/cli/tests/testdata/run/error_import_map_unable_to_load.out
index 50760e438..50760e438 100644
--- a/cli/tests/testdata/error_import_map_unable_to_load.out
+++ b/cli/tests/testdata/run/error_import_map_unable_to_load.out
diff --git a/cli/tests/testdata/error_local_static_import_from_remote.js b/cli/tests/testdata/run/error_local_static_import_from_remote.js
index eb7fd23ba..eb7fd23ba 100644
--- a/cli/tests/testdata/error_local_static_import_from_remote.js
+++ b/cli/tests/testdata/run/error_local_static_import_from_remote.js
diff --git a/cli/tests/testdata/error_local_static_import_from_remote.js.out b/cli/tests/testdata/run/error_local_static_import_from_remote.js.out
index 1ea10bd88..34f9e81e1 100644
--- a/cli/tests/testdata/error_local_static_import_from_remote.js.out
+++ b/cli/tests/testdata/run/error_local_static_import_from_remote.js.out
@@ -1,4 +1,4 @@
[WILDCARD]
error: Remote modules are not allowed to import local modules. Consider using a dynamic import instead.
Importing: file:///some/dir/file.js
- at http://localhost:4545/error_local_static_import_from_remote.js:1:8
+ at http://localhost:4545/run/error_local_static_import_from_remote.js:1:8
diff --git a/cli/tests/testdata/error_local_static_import_from_remote.ts b/cli/tests/testdata/run/error_local_static_import_from_remote.ts
index a831db0c4..a831db0c4 100644
--- a/cli/tests/testdata/error_local_static_import_from_remote.ts
+++ b/cli/tests/testdata/run/error_local_static_import_from_remote.ts
diff --git a/cli/tests/testdata/error_local_static_import_from_remote.ts.out b/cli/tests/testdata/run/error_local_static_import_from_remote.ts.out
index 7308c6f9d..88990a049 100644
--- a/cli/tests/testdata/error_local_static_import_from_remote.ts.out
+++ b/cli/tests/testdata/run/error_local_static_import_from_remote.ts.out
@@ -1,4 +1,4 @@
[WILDCARD]
error: Remote modules are not allowed to import local modules. Consider using a dynamic import instead.
Importing: file:///some/dir/file.ts
- at http://localhost:4545/error_local_static_import_from_remote.ts:1:8
+ at http://localhost:4545/run/error_local_static_import_from_remote.ts:1:8
diff --git a/cli/tests/testdata/error_missing_module_named_import.ts b/cli/tests/testdata/run/error_missing_module_named_import.ts
index 9eb5239ff..9eb5239ff 100644
--- a/cli/tests/testdata/error_missing_module_named_import.ts
+++ b/cli/tests/testdata/run/error_missing_module_named_import.ts
diff --git a/cli/tests/testdata/error_missing_module_named_import.ts.out b/cli/tests/testdata/run/error_missing_module_named_import.ts.out
index 3dccaffb1..3dccaffb1 100644
--- a/cli/tests/testdata/error_missing_module_named_import.ts.out
+++ b/cli/tests/testdata/run/error_missing_module_named_import.ts.out
diff --git a/cli/tests/testdata/error_name_non_string.js b/cli/tests/testdata/run/error_name_non_string.js
index ae9609927..ae9609927 100644
--- a/cli/tests/testdata/error_name_non_string.js
+++ b/cli/tests/testdata/run/error_name_non_string.js
diff --git a/cli/tests/testdata/error_name_non_string.js.out b/cli/tests/testdata/run/error_name_non_string.js.out
index a77f336e9..a77f336e9 100644
--- a/cli/tests/testdata/error_name_non_string.js.out
+++ b/cli/tests/testdata/run/error_name_non_string.js.out
diff --git a/cli/tests/testdata/run/error_no_check.ts b/cli/tests/testdata/run/error_no_check.ts
new file mode 100644
index 000000000..2da01e639
--- /dev/null
+++ b/cli/tests/testdata/run/error_no_check.ts
@@ -0,0 +1 @@
+export { AnInterface, isAnInterface } from "../subdir/type_and_code.ts";
diff --git a/cli/tests/testdata/run/error_no_check.ts.out b/cli/tests/testdata/run/error_no_check.ts.out
new file mode 100644
index 000000000..78f478045
--- /dev/null
+++ b/cli/tests/testdata/run/error_no_check.ts.out
@@ -0,0 +1,2 @@
+error: Uncaught SyntaxError: The requested module '../subdir/type_and_code.ts' does not provide an export named 'AnInterface'
+[WILDCARD] \ No newline at end of file
diff --git a/cli/tests/testdata/error_syntax.js b/cli/tests/testdata/run/error_syntax.js
index c0414c356..c0414c356 100644
--- a/cli/tests/testdata/error_syntax.js
+++ b/cli/tests/testdata/run/error_syntax.js
diff --git a/cli/tests/testdata/error_syntax.js.out b/cli/tests/testdata/run/error_syntax.js.out
index 6d3f05b8e..6d3f05b8e 100644
--- a/cli/tests/testdata/error_syntax.js.out
+++ b/cli/tests/testdata/run/error_syntax.js.out
diff --git a/cli/tests/testdata/error_syntax_empty_trailing_line.mjs b/cli/tests/testdata/run/error_syntax_empty_trailing_line.mjs
index 864dfb0c7..864dfb0c7 100644
--- a/cli/tests/testdata/error_syntax_empty_trailing_line.mjs
+++ b/cli/tests/testdata/run/error_syntax_empty_trailing_line.mjs
diff --git a/cli/tests/testdata/error_syntax_empty_trailing_line.mjs.out b/cli/tests/testdata/run/error_syntax_empty_trailing_line.mjs.out
index f4bbc6708..f4bbc6708 100644
--- a/cli/tests/testdata/error_syntax_empty_trailing_line.mjs.out
+++ b/cli/tests/testdata/run/error_syntax_empty_trailing_line.mjs.out
diff --git a/cli/tests/testdata/run/error_type_definitions.ts b/cli/tests/testdata/run/error_type_definitions.ts
new file mode 100644
index 000000000..86675cbaa
--- /dev/null
+++ b/cli/tests/testdata/run/error_type_definitions.ts
@@ -0,0 +1,5 @@
+// @deno-types="../type_definitions/bar.d.ts"
+import { Bar } from "../type_definitions/bar.js";
+
+const bar = new Bar();
+console.log(bar);
diff --git a/cli/tests/testdata/error_type_definitions.ts.out b/cli/tests/testdata/run/error_type_definitions.ts.out
index 5e1d73ca4..5e1d73ca4 100644
--- a/cli/tests/testdata/error_type_definitions.ts.out
+++ b/cli/tests/testdata/run/error_type_definitions.ts.out
diff --git a/cli/tests/testdata/es_private_fields.js b/cli/tests/testdata/run/es_private_fields.js
index b5f83e39c..b5f83e39c 100644
--- a/cli/tests/testdata/es_private_fields.js
+++ b/cli/tests/testdata/run/es_private_fields.js
diff --git a/cli/tests/testdata/es_private_fields.js.out b/cli/tests/testdata/run/es_private_fields.js.out
index be1970b05..be1970b05 100644
--- a/cli/tests/testdata/es_private_fields.js.out
+++ b/cli/tests/testdata/run/es_private_fields.js.out
diff --git a/cli/tests/testdata/eval_context_throw_dom_exception.js b/cli/tests/testdata/run/eval_context_throw_dom_exception.js
index b8e99d498..b8e99d498 100644
--- a/cli/tests/testdata/eval_context_throw_dom_exception.js
+++ b/cli/tests/testdata/run/eval_context_throw_dom_exception.js
diff --git a/cli/tests/testdata/eval_context_throw_dom_exception.js.out b/cli/tests/testdata/run/eval_context_throw_dom_exception.js.out
index 39e164083..39e164083 100644
--- a/cli/tests/testdata/eval_context_throw_dom_exception.js.out
+++ b/cli/tests/testdata/run/eval_context_throw_dom_exception.js.out
diff --git a/cli/tests/testdata/event_listener_error.ts b/cli/tests/testdata/run/event_listener_error.ts
index 1cbdf7bc2..1cbdf7bc2 100644
--- a/cli/tests/testdata/event_listener_error.ts
+++ b/cli/tests/testdata/run/event_listener_error.ts
diff --git a/cli/tests/testdata/event_listener_error.ts.out b/cli/tests/testdata/run/event_listener_error.ts.out
index a20a91dfd..a20a91dfd 100644
--- a/cli/tests/testdata/event_listener_error.ts.out
+++ b/cli/tests/testdata/run/event_listener_error.ts.out
diff --git a/cli/tests/testdata/event_listener_error_handled.ts b/cli/tests/testdata/run/event_listener_error_handled.ts
index c4c8fd1cd..c4c8fd1cd 100644
--- a/cli/tests/testdata/event_listener_error_handled.ts
+++ b/cli/tests/testdata/run/event_listener_error_handled.ts
diff --git a/cli/tests/testdata/event_listener_error_handled.ts.out b/cli/tests/testdata/run/event_listener_error_handled.ts.out
index d3cf525c3..d3cf525c3 100644
--- a/cli/tests/testdata/event_listener_error_handled.ts.out
+++ b/cli/tests/testdata/run/event_listener_error_handled.ts.out
diff --git a/cli/tests/testdata/event_listener_error_immediate_exit.ts b/cli/tests/testdata/run/event_listener_error_immediate_exit.ts
index c9e94c01b..c9e94c01b 100644
--- a/cli/tests/testdata/event_listener_error_immediate_exit.ts
+++ b/cli/tests/testdata/run/event_listener_error_immediate_exit.ts
diff --git a/cli/tests/testdata/event_listener_error_immediate_exit.ts.out b/cli/tests/testdata/run/event_listener_error_immediate_exit.ts.out
index 1fb3ce76a..1fb3ce76a 100644
--- a/cli/tests/testdata/event_listener_error_immediate_exit.ts.out
+++ b/cli/tests/testdata/run/event_listener_error_immediate_exit.ts.out
diff --git a/cli/tests/testdata/event_listener_error_immediate_exit_worker.ts b/cli/tests/testdata/run/event_listener_error_immediate_exit_worker.ts
index 58c45d1bb..58c45d1bb 100644
--- a/cli/tests/testdata/event_listener_error_immediate_exit_worker.ts
+++ b/cli/tests/testdata/run/event_listener_error_immediate_exit_worker.ts
diff --git a/cli/tests/testdata/event_listener_error_immediate_exit_worker.ts.out b/cli/tests/testdata/run/event_listener_error_immediate_exit_worker.ts.out
index 8bd312298..8bd312298 100644
--- a/cli/tests/testdata/event_listener_error_immediate_exit_worker.ts.out
+++ b/cli/tests/testdata/run/event_listener_error_immediate_exit_worker.ts.out
diff --git a/cli/tests/testdata/exec_path.ts b/cli/tests/testdata/run/exec_path.ts
index b70b23237..b70b23237 100644
--- a/cli/tests/testdata/exec_path.ts
+++ b/cli/tests/testdata/run/exec_path.ts
diff --git a/cli/tests/testdata/exit_error42.ts b/cli/tests/testdata/run/exit_error42.ts
index e4db41f3a..e4db41f3a 100644
--- a/cli/tests/testdata/exit_error42.ts
+++ b/cli/tests/testdata/run/exit_error42.ts
diff --git a/cli/tests/testdata/exit_error42.ts.out b/cli/tests/testdata/run/exit_error42.ts.out
index 90be1f305..90be1f305 100644
--- a/cli/tests/testdata/exit_error42.ts.out
+++ b/cli/tests/testdata/run/exit_error42.ts.out
diff --git a/cli/tests/testdata/run/export_type_def.ts b/cli/tests/testdata/run/export_type_def.ts
new file mode 100644
index 000000000..9a1e2b0fe
--- /dev/null
+++ b/cli/tests/testdata/run/export_type_def.ts
@@ -0,0 +1,2 @@
+// @deno-types="../type_definitions/foo.d.ts"
+export { foo } from "../type_definitions/foo.js";
diff --git a/cli/tests/testdata/fetch/hello.txt b/cli/tests/testdata/run/fetch/hello.txt
index af5626b4a..af5626b4a 100644
--- a/cli/tests/testdata/fetch/hello.txt
+++ b/cli/tests/testdata/run/fetch/hello.txt
diff --git a/cli/tests/testdata/fetch/other.ts b/cli/tests/testdata/run/fetch/other.ts
index 91fe376b3..91fe376b3 100644
--- a/cli/tests/testdata/fetch/other.ts
+++ b/cli/tests/testdata/run/fetch/other.ts
diff --git a/cli/tests/testdata/fetch/test.ts b/cli/tests/testdata/run/fetch/test.ts
index baa52775d..baa52775d 100644
--- a/cli/tests/testdata/fetch/test.ts
+++ b/cli/tests/testdata/run/fetch/test.ts
diff --git a/cli/tests/testdata/fetch_async_error_stack.ts b/cli/tests/testdata/run/fetch_async_error_stack.ts
index f583192c2..f583192c2 100644
--- a/cli/tests/testdata/fetch_async_error_stack.ts
+++ b/cli/tests/testdata/run/fetch_async_error_stack.ts
diff --git a/cli/tests/testdata/fetch_async_error_stack.ts.out b/cli/tests/testdata/run/fetch_async_error_stack.ts.out
index 0a7b353e2..0a7b353e2 100644
--- a/cli/tests/testdata/fetch_async_error_stack.ts.out
+++ b/cli/tests/testdata/run/fetch_async_error_stack.ts.out
diff --git a/cli/tests/testdata/fetch_response_finalization.js b/cli/tests/testdata/run/fetch_response_finalization.js
index dd7c355eb..dd7c355eb 100644
--- a/cli/tests/testdata/fetch_response_finalization.js
+++ b/cli/tests/testdata/run/fetch_response_finalization.js
diff --git a/cli/tests/testdata/fetch_response_finalization.js.out b/cli/tests/testdata/run/fetch_response_finalization.js.out
index 844a4e4b2..844a4e4b2 100644
--- a/cli/tests/testdata/fetch_response_finalization.js.out
+++ b/cli/tests/testdata/run/fetch_response_finalization.js.out
diff --git a/cli/tests/testdata/unstable_ffi_1.js b/cli/tests/testdata/run/ffi/unstable_ffi_1.js
index 8ca6c3a60..8ca6c3a60 100644
--- a/cli/tests/testdata/unstable_ffi_1.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_1.js
diff --git a/cli/tests/testdata/unstable_ffi_1.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_1.js.out
index 7c564be8c..7c564be8c 100644
--- a/cli/tests/testdata/unstable_ffi_1.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_1.js.out
diff --git a/cli/tests/testdata/unstable_ffi_10.js b/cli/tests/testdata/run/ffi/unstable_ffi_10.js
index 83687c584..83687c584 100644
--- a/cli/tests/testdata/unstable_ffi_10.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_10.js
diff --git a/cli/tests/testdata/unstable_ffi_10.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_10.js.out
index bf7e1bd4f..bf7e1bd4f 100644
--- a/cli/tests/testdata/unstable_ffi_10.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_10.js.out
diff --git a/cli/tests/testdata/unstable_ffi_11.js b/cli/tests/testdata/run/ffi/unstable_ffi_11.js
index 5538753be..5538753be 100644
--- a/cli/tests/testdata/unstable_ffi_11.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_11.js
diff --git a/cli/tests/testdata/unstable_ffi_11.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_11.js.out
index 2d2d72666..2d2d72666 100644
--- a/cli/tests/testdata/unstable_ffi_11.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_11.js.out
diff --git a/cli/tests/testdata/unstable_ffi_12.js b/cli/tests/testdata/run/ffi/unstable_ffi_12.js
index 089c9b5b1..089c9b5b1 100644
--- a/cli/tests/testdata/unstable_ffi_12.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_12.js
diff --git a/cli/tests/testdata/unstable_ffi_12.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_12.js.out
index 377d8e4a5..377d8e4a5 100644
--- a/cli/tests/testdata/unstable_ffi_12.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_12.js.out
diff --git a/cli/tests/testdata/unstable_ffi_13.js b/cli/tests/testdata/run/ffi/unstable_ffi_13.js
index 630be2e6d..630be2e6d 100644
--- a/cli/tests/testdata/unstable_ffi_13.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_13.js
diff --git a/cli/tests/testdata/unstable_ffi_13.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_13.js.out
index 6ca67a6f2..6ca67a6f2 100644
--- a/cli/tests/testdata/unstable_ffi_13.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_13.js.out
diff --git a/cli/tests/testdata/unstable_ffi_14.js b/cli/tests/testdata/run/ffi/unstable_ffi_14.js
index b04c7865e..b04c7865e 100644
--- a/cli/tests/testdata/unstable_ffi_14.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_14.js
diff --git a/cli/tests/testdata/unstable_ffi_14.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_14.js.out
index 11fcd5580..11fcd5580 100644
--- a/cli/tests/testdata/unstable_ffi_14.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_14.js.out
diff --git a/cli/tests/testdata/unstable_ffi_15.js b/cli/tests/testdata/run/ffi/unstable_ffi_15.js
index 865f63c75..865f63c75 100644
--- a/cli/tests/testdata/unstable_ffi_15.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_15.js
diff --git a/cli/tests/testdata/unstable_ffi_15.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_15.js.out
index 3015e5c91..3015e5c91 100644
--- a/cli/tests/testdata/unstable_ffi_15.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_15.js.out
diff --git a/cli/tests/testdata/unstable_ffi_2.js b/cli/tests/testdata/run/ffi/unstable_ffi_2.js
index 7f3f34f37..7f3f34f37 100644
--- a/cli/tests/testdata/unstable_ffi_2.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_2.js
diff --git a/cli/tests/testdata/unstable_ffi_2.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_2.js.out
index cc4cc3dc6..cc4cc3dc6 100644
--- a/cli/tests/testdata/unstable_ffi_2.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_2.js.out
diff --git a/cli/tests/testdata/unstable_ffi_3.js b/cli/tests/testdata/run/ffi/unstable_ffi_3.js
index a8f7f4180..a8f7f4180 100644
--- a/cli/tests/testdata/unstable_ffi_3.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_3.js
diff --git a/cli/tests/testdata/unstable_ffi_3.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_3.js.out
index cc4cc3dc6..cc4cc3dc6 100644
--- a/cli/tests/testdata/unstable_ffi_3.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_3.js.out
diff --git a/cli/tests/testdata/unstable_ffi_4.js b/cli/tests/testdata/run/ffi/unstable_ffi_4.js
index 8b4f3d75a..8b4f3d75a 100644
--- a/cli/tests/testdata/unstable_ffi_4.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_4.js
diff --git a/cli/tests/testdata/unstable_ffi_4.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_4.js.out
index e0f40f2ee..e0f40f2ee 100644
--- a/cli/tests/testdata/unstable_ffi_4.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_4.js.out
diff --git a/cli/tests/testdata/unstable_ffi_5.js b/cli/tests/testdata/run/ffi/unstable_ffi_5.js
index d08d8eaa4..d08d8eaa4 100644
--- a/cli/tests/testdata/unstable_ffi_5.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_5.js
diff --git a/cli/tests/testdata/unstable_ffi_5.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_5.js.out
index e3db6af26..e3db6af26 100644
--- a/cli/tests/testdata/unstable_ffi_5.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_5.js.out
diff --git a/cli/tests/testdata/unstable_ffi_6.js b/cli/tests/testdata/run/ffi/unstable_ffi_6.js
index 9e4f1c761..9e4f1c761 100644
--- a/cli/tests/testdata/unstable_ffi_6.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_6.js
diff --git a/cli/tests/testdata/unstable_ffi_6.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_6.js.out
index c59f51d04..c59f51d04 100644
--- a/cli/tests/testdata/unstable_ffi_6.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_6.js.out
diff --git a/cli/tests/testdata/unstable_ffi_7.js b/cli/tests/testdata/run/ffi/unstable_ffi_7.js
index 96e60f377..96e60f377 100644
--- a/cli/tests/testdata/unstable_ffi_7.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_7.js
diff --git a/cli/tests/testdata/unstable_ffi_7.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_7.js.out
index 6ab413537..6ab413537 100644
--- a/cli/tests/testdata/unstable_ffi_7.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_7.js.out
diff --git a/cli/tests/testdata/unstable_ffi_8.js b/cli/tests/testdata/run/ffi/unstable_ffi_8.js
index 187b83891..187b83891 100644
--- a/cli/tests/testdata/unstable_ffi_8.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_8.js
diff --git a/cli/tests/testdata/unstable_ffi_8.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_8.js.out
index 338db2631..338db2631 100644
--- a/cli/tests/testdata/unstable_ffi_8.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_8.js.out
diff --git a/cli/tests/testdata/unstable_ffi_9.js b/cli/tests/testdata/run/ffi/unstable_ffi_9.js
index e968e534c..e968e534c 100644
--- a/cli/tests/testdata/unstable_ffi_9.js
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_9.js
diff --git a/cli/tests/testdata/unstable_ffi_9.js.out b/cli/tests/testdata/run/ffi/unstable_ffi_9.js.out
index fb6d75f14..fb6d75f14 100644
--- a/cli/tests/testdata/unstable_ffi_9.js.out
+++ b/cli/tests/testdata/run/ffi/unstable_ffi_9.js.out
diff --git a/cli/tests/testdata/finalization_registry.js b/cli/tests/testdata/run/finalization_registry.js
index 7d7d58149..7d7d58149 100644
--- a/cli/tests/testdata/finalization_registry.js
+++ b/cli/tests/testdata/run/finalization_registry.js
diff --git a/cli/tests/testdata/finalization_registry.js.out b/cli/tests/testdata/run/finalization_registry.js.out
index fee61413a..fee61413a 100644
--- a/cli/tests/testdata/finalization_registry.js.out
+++ b/cli/tests/testdata/run/finalization_registry.js.out
diff --git a/cli/tests/testdata/fix_dynamic_import_errors.js b/cli/tests/testdata/run/fix_dynamic_import_errors.js
index 317047ccb..1d7be37e0 100644
--- a/cli/tests/testdata/fix_dynamic_import_errors.js
+++ b/cli/tests/testdata/run/fix_dynamic_import_errors.js
@@ -1,7 +1,7 @@
-import("./dynamic_import/b.js").catch(() => {
+import("../dynamic_import/b.js").catch(() => {
console.log("caught import error from b.js");
});
-import("./dynamic_import/c.js").catch(() => {
+import("../dynamic_import/c.js").catch(() => {
console.log("caught import error from c.js");
});
diff --git a/cli/tests/testdata/fix_dynamic_import_errors.js.out b/cli/tests/testdata/run/fix_dynamic_import_errors.js.out
index e7856fb9c..e7856fb9c 100644
--- a/cli/tests/testdata/fix_dynamic_import_errors.js.out
+++ b/cli/tests/testdata/run/fix_dynamic_import_errors.js.out
diff --git a/cli/tests/testdata/run/fix_emittable_skipped.js b/cli/tests/testdata/run/fix_emittable_skipped.js
new file mode 100644
index 000000000..a4ccc9efd
--- /dev/null
+++ b/cli/tests/testdata/run/fix_emittable_skipped.js
@@ -0,0 +1,7 @@
+/// <reference types="../subdir/emittable.d.ts" />
+
+import "../subdir/polyfill.ts";
+
+export const a = "a";
+
+console.log(globalThis.polyfill);
diff --git a/cli/tests/testdata/fix_emittable_skipped.ts.out b/cli/tests/testdata/run/fix_emittable_skipped.ts.out
index 108c2d67f..108c2d67f 100644
--- a/cli/tests/testdata/fix_emittable_skipped.ts.out
+++ b/cli/tests/testdata/run/fix_emittable_skipped.ts.out
diff --git a/cli/tests/testdata/fix_exotic_specifiers.ts b/cli/tests/testdata/run/fix_exotic_specifiers.ts
index 101667b2a..101667b2a 100644
--- a/cli/tests/testdata/fix_exotic_specifiers.ts
+++ b/cli/tests/testdata/run/fix_exotic_specifiers.ts
diff --git a/cli/tests/testdata/fix_exotic_specifiers.ts.out b/cli/tests/testdata/run/fix_exotic_specifiers.ts.out
index 7afdb808d..7afdb808d 100644
--- a/cli/tests/testdata/fix_exotic_specifiers.ts.out
+++ b/cli/tests/testdata/run/fix_exotic_specifiers.ts.out
diff --git a/cli/tests/testdata/run/fix_js_import_js.ts b/cli/tests/testdata/run/fix_js_import_js.ts
new file mode 100644
index 000000000..0f01877cd
--- /dev/null
+++ b/cli/tests/testdata/run/fix_js_import_js.ts
@@ -0,0 +1,3 @@
+import { isMod4 } from "../subdir/mod6.js";
+
+console.log(isMod4);
diff --git a/cli/tests/testdata/fix_js_import_js.ts.out b/cli/tests/testdata/run/fix_js_import_js.ts.out
index 27ba77dda..27ba77dda 100644
--- a/cli/tests/testdata/fix_js_import_js.ts.out
+++ b/cli/tests/testdata/run/fix_js_import_js.ts.out
diff --git a/cli/tests/testdata/run/fix_js_imports.ts b/cli/tests/testdata/run/fix_js_imports.ts
new file mode 100644
index 000000000..6ed13bae3
--- /dev/null
+++ b/cli/tests/testdata/run/fix_js_imports.ts
@@ -0,0 +1,3 @@
+import * as amdLike from "../subdir/amd_like.js";
+
+console.log(amdLike);
diff --git a/cli/tests/testdata/fix_js_imports.ts.out b/cli/tests/testdata/run/fix_js_imports.ts.out
index 5e45122de..5e45122de 100644
--- a/cli/tests/testdata/fix_js_imports.ts.out
+++ b/cli/tests/testdata/run/fix_js_imports.ts.out
diff --git a/cli/tests/testdata/fix_tsc_file_exists.out b/cli/tests/testdata/run/fix_tsc_file_exists.out
index ce0136250..ce0136250 100644
--- a/cli/tests/testdata/fix_tsc_file_exists.out
+++ b/cli/tests/testdata/run/fix_tsc_file_exists.out
diff --git a/cli/tests/testdata/fix_worker_dispatchevent.ts b/cli/tests/testdata/run/fix_worker_dispatchevent.ts
index 1b73b52dc..1b73b52dc 100644
--- a/cli/tests/testdata/fix_worker_dispatchevent.ts
+++ b/cli/tests/testdata/run/fix_worker_dispatchevent.ts
diff --git a/cli/tests/testdata/fix_worker_dispatchevent.ts.out b/cli/tests/testdata/run/fix_worker_dispatchevent.ts.out
index 2e9ba477f..2e9ba477f 100644
--- a/cli/tests/testdata/fix_worker_dispatchevent.ts.out
+++ b/cli/tests/testdata/run/fix_worker_dispatchevent.ts.out
diff --git a/cli/tests/testdata/followup_dyn_import_resolves/main.ts b/cli/tests/testdata/run/followup_dyn_import_resolves/main.ts
index a8508f942..a8508f942 100644
--- a/cli/tests/testdata/followup_dyn_import_resolves/main.ts
+++ b/cli/tests/testdata/run/followup_dyn_import_resolves/main.ts
diff --git a/cli/tests/testdata/followup_dyn_import_resolves/main.ts.out b/cli/tests/testdata/run/followup_dyn_import_resolves/main.ts.out
index a19976d4a..a19976d4a 100644
--- a/cli/tests/testdata/followup_dyn_import_resolves/main.ts.out
+++ b/cli/tests/testdata/run/followup_dyn_import_resolves/main.ts.out
diff --git a/cli/tests/testdata/followup_dyn_import_resolves/sub1.ts b/cli/tests/testdata/run/followup_dyn_import_resolves/sub1.ts
index d06c30221..d06c30221 100644
--- a/cli/tests/testdata/followup_dyn_import_resolves/sub1.ts
+++ b/cli/tests/testdata/run/followup_dyn_import_resolves/sub1.ts
diff --git a/cli/tests/testdata/followup_dyn_import_resolves/sub2.ts b/cli/tests/testdata/run/followup_dyn_import_resolves/sub2.ts
index cce2b524c..cce2b524c 100644
--- a/cli/tests/testdata/followup_dyn_import_resolves/sub2.ts
+++ b/cli/tests/testdata/run/followup_dyn_import_resolves/sub2.ts
diff --git a/cli/tests/testdata/future_check.ts b/cli/tests/testdata/run/future_check.ts
index 4d41fe06a..4d41fe06a 100644
--- a/cli/tests/testdata/future_check.ts
+++ b/cli/tests/testdata/run/future_check.ts
diff --git a/cli/tests/testdata/future_check2.out b/cli/tests/testdata/run/future_check2.out
index c626a5485..c626a5485 100644
--- a/cli/tests/testdata/future_check2.out
+++ b/cli/tests/testdata/run/future_check2.out
diff --git a/cli/tests/testdata/heapstats.js b/cli/tests/testdata/run/heapstats.js
index 1f06e7f6e..1f06e7f6e 100644
--- a/cli/tests/testdata/heapstats.js
+++ b/cli/tests/testdata/run/heapstats.js
diff --git a/cli/tests/testdata/heapstats.js.out b/cli/tests/testdata/run/heapstats.js.out
index b75a755f8..b75a755f8 100644
--- a/cli/tests/testdata/heapstats.js.out
+++ b/cli/tests/testdata/run/heapstats.js.out
diff --git a/cli/tests/testdata/http2_request_url.ts b/cli/tests/testdata/run/http2_request_url.ts
index 5acff8cc2..5acff8cc2 100644
--- a/cli/tests/testdata/http2_request_url.ts
+++ b/cli/tests/testdata/run/http2_request_url.ts
diff --git a/cli/tests/testdata/https_import.ts b/cli/tests/testdata/run/https_import.ts
index 3bcc90326..3bcc90326 100644
--- a/cli/tests/testdata/https_import.ts
+++ b/cli/tests/testdata/run/https_import.ts
diff --git a/cli/tests/testdata/https_import.ts.out b/cli/tests/testdata/run/https_import.ts.out
index e965047ad..e965047ad 100644
--- a/cli/tests/testdata/https_import.ts.out
+++ b/cli/tests/testdata/run/https_import.ts.out
diff --git a/cli/tests/testdata/if_main.ts b/cli/tests/testdata/run/if_main.ts
index 4dcfecea0..4dcfecea0 100644
--- a/cli/tests/testdata/if_main.ts
+++ b/cli/tests/testdata/run/if_main.ts
diff --git a/cli/tests/testdata/if_main.ts.out b/cli/tests/testdata/run/if_main.ts.out
index ba2906d06..ba2906d06 100644
--- a/cli/tests/testdata/if_main.ts.out
+++ b/cli/tests/testdata/run/if_main.ts.out
diff --git a/cli/tests/testdata/import_blob_url.ts b/cli/tests/testdata/run/import_blob_url.ts
index 86bb634e1..86bb634e1 100644
--- a/cli/tests/testdata/import_blob_url.ts
+++ b/cli/tests/testdata/run/import_blob_url.ts
diff --git a/cli/tests/testdata/import_blob_url.ts.out b/cli/tests/testdata/run/import_blob_url.ts.out
index bfa0b9d94..bfa0b9d94 100644
--- a/cli/tests/testdata/import_blob_url.ts.out
+++ b/cli/tests/testdata/run/import_blob_url.ts.out
diff --git a/cli/tests/testdata/import_blob_url_error_stack.ts b/cli/tests/testdata/run/import_blob_url_error_stack.ts
index f9c4f2e9d..f9c4f2e9d 100644
--- a/cli/tests/testdata/import_blob_url_error_stack.ts
+++ b/cli/tests/testdata/run/import_blob_url_error_stack.ts
diff --git a/cli/tests/testdata/import_blob_url_error_stack.ts.out b/cli/tests/testdata/run/import_blob_url_error_stack.ts.out
index 52b76fd5c..52b76fd5c 100644
--- a/cli/tests/testdata/import_blob_url_error_stack.ts.out
+++ b/cli/tests/testdata/run/import_blob_url_error_stack.ts.out
diff --git a/cli/tests/testdata/import_blob_url_import_relative.ts b/cli/tests/testdata/run/import_blob_url_import_relative.ts
index ad130bdac..ad130bdac 100644
--- a/cli/tests/testdata/import_blob_url_import_relative.ts
+++ b/cli/tests/testdata/run/import_blob_url_import_relative.ts
diff --git a/cli/tests/testdata/import_blob_url_import_relative.ts.out b/cli/tests/testdata/run/import_blob_url_import_relative.ts.out
index 59a6f07fb..59a6f07fb 100644
--- a/cli/tests/testdata/import_blob_url_import_relative.ts.out
+++ b/cli/tests/testdata/run/import_blob_url_import_relative.ts.out
diff --git a/cli/tests/testdata/import_blob_url_imports.ts b/cli/tests/testdata/run/import_blob_url_imports.ts
index a7c639152..a7c639152 100644
--- a/cli/tests/testdata/import_blob_url_imports.ts
+++ b/cli/tests/testdata/run/import_blob_url_imports.ts
diff --git a/cli/tests/testdata/import_blob_url_imports.ts.out b/cli/tests/testdata/run/import_blob_url_imports.ts.out
index e965047ad..e965047ad 100644
--- a/cli/tests/testdata/import_blob_url_imports.ts.out
+++ b/cli/tests/testdata/run/import_blob_url_imports.ts.out
diff --git a/cli/tests/testdata/import_blob_url_jsx.ts b/cli/tests/testdata/run/import_blob_url_jsx.ts
index 8d645796a..8d645796a 100644
--- a/cli/tests/testdata/import_blob_url_jsx.ts
+++ b/cli/tests/testdata/run/import_blob_url_jsx.ts
diff --git a/cli/tests/testdata/import_blob_url_jsx.ts.out b/cli/tests/testdata/run/import_blob_url_jsx.ts.out
index c1c85f250..c1c85f250 100644
--- a/cli/tests/testdata/import_blob_url_jsx.ts.out
+++ b/cli/tests/testdata/run/import_blob_url_jsx.ts.out
diff --git a/cli/tests/testdata/053_import_compression/brotli b/cli/tests/testdata/run/import_compression/brotli
index 65f679d57..65f679d57 100644
--- a/cli/tests/testdata/053_import_compression/brotli
+++ b/cli/tests/testdata/run/import_compression/brotli
diff --git a/cli/tests/testdata/053_import_compression/gziped b/cli/tests/testdata/run/import_compression/gziped
index 9f9a7bc69..9f9a7bc69 100644
--- a/cli/tests/testdata/053_import_compression/gziped
+++ b/cli/tests/testdata/run/import_compression/gziped
Binary files differ
diff --git a/cli/tests/testdata/053_import_compression.out b/cli/tests/testdata/run/import_compression/main.out
index 371994979..371994979 100644
--- a/cli/tests/testdata/053_import_compression.out
+++ b/cli/tests/testdata/run/import_compression/main.out
diff --git a/cli/tests/testdata/run/import_compression/main.ts b/cli/tests/testdata/run/import_compression/main.ts
new file mode 100644
index 000000000..3dcd6fa24
--- /dev/null
+++ b/cli/tests/testdata/run/import_compression/main.ts
@@ -0,0 +1,13 @@
+import "http://127.0.0.1:4545/run/import_compression/gziped";
+import "http://127.0.0.1:4545/run/import_compression/brotli";
+
+console.log(
+ await fetch(
+ "http://127.0.0.1:4545/run/import_compression/gziped",
+ ).then((res) => res.text()),
+);
+console.log(
+ await fetch(
+ "http://127.0.0.1:4545/run/import_compression/brotli",
+ ).then((res) => res.text()),
+);
diff --git a/cli/tests/testdata/import_data_url.ts b/cli/tests/testdata/run/import_data_url.ts
index 258514a5e..258514a5e 100644
--- a/cli/tests/testdata/import_data_url.ts
+++ b/cli/tests/testdata/run/import_data_url.ts
diff --git a/cli/tests/testdata/import_data_url.ts.out b/cli/tests/testdata/run/import_data_url.ts.out
index bfa0b9d94..bfa0b9d94 100644
--- a/cli/tests/testdata/import_data_url.ts.out
+++ b/cli/tests/testdata/run/import_data_url.ts.out
diff --git a/cli/tests/testdata/import_data_url_error_stack.ts b/cli/tests/testdata/run/import_data_url_error_stack.ts
index 022e49fe1..022e49fe1 100644
--- a/cli/tests/testdata/import_data_url_error_stack.ts
+++ b/cli/tests/testdata/run/import_data_url_error_stack.ts
diff --git a/cli/tests/testdata/import_data_url_error_stack.ts.out b/cli/tests/testdata/run/import_data_url_error_stack.ts.out
index ccd72e4ad..ccd72e4ad 100644
--- a/cli/tests/testdata/import_data_url_error_stack.ts.out
+++ b/cli/tests/testdata/run/import_data_url_error_stack.ts.out
diff --git a/cli/tests/testdata/import_data_url_import_relative.ts b/cli/tests/testdata/run/import_data_url_import_relative.ts
index 23947fe60..23947fe60 100644
--- a/cli/tests/testdata/import_data_url_import_relative.ts
+++ b/cli/tests/testdata/run/import_data_url_import_relative.ts
diff --git a/cli/tests/testdata/import_data_url_import_relative.ts.out b/cli/tests/testdata/run/import_data_url_import_relative.ts.out
index 821c3e4df..821c3e4df 100644
--- a/cli/tests/testdata/import_data_url_import_relative.ts.out
+++ b/cli/tests/testdata/run/import_data_url_import_relative.ts.out
diff --git a/cli/tests/testdata/import_data_url_imports.ts b/cli/tests/testdata/run/import_data_url_imports.ts
index df7dae727..df7dae727 100644
--- a/cli/tests/testdata/import_data_url_imports.ts
+++ b/cli/tests/testdata/run/import_data_url_imports.ts
diff --git a/cli/tests/testdata/import_data_url_imports.ts.out b/cli/tests/testdata/run/import_data_url_imports.ts.out
index e965047ad..e965047ad 100644
--- a/cli/tests/testdata/import_data_url_imports.ts.out
+++ b/cli/tests/testdata/run/import_data_url_imports.ts.out
diff --git a/cli/tests/testdata/import_data_url_jsx.ts b/cli/tests/testdata/run/import_data_url_jsx.ts
index 1881211f9..1881211f9 100644
--- a/cli/tests/testdata/import_data_url_jsx.ts
+++ b/cli/tests/testdata/run/import_data_url_jsx.ts
diff --git a/cli/tests/testdata/import_data_url_jsx.ts.out b/cli/tests/testdata/run/import_data_url_jsx.ts.out
index c1c85f250..c1c85f250 100644
--- a/cli/tests/testdata/import_data_url_jsx.ts.out
+++ b/cli/tests/testdata/run/import_data_url_jsx.ts.out
diff --git a/cli/tests/testdata/import_dynamic_data_url.ts b/cli/tests/testdata/run/import_dynamic_data_url.ts
index 53a0fbcd3..53a0fbcd3 100644
--- a/cli/tests/testdata/import_dynamic_data_url.ts
+++ b/cli/tests/testdata/run/import_dynamic_data_url.ts
diff --git a/cli/tests/testdata/import_dynamic_data_url.ts.out b/cli/tests/testdata/run/import_dynamic_data_url.ts.out
index bfa0b9d94..bfa0b9d94 100644
--- a/cli/tests/testdata/import_dynamic_data_url.ts.out
+++ b/cli/tests/testdata/run/import_dynamic_data_url.ts.out
diff --git a/cli/tests/testdata/import_extensionless.ts b/cli/tests/testdata/run/import_extensionless.ts
index 689d553ff..689d553ff 100644
--- a/cli/tests/testdata/import_extensionless.ts
+++ b/cli/tests/testdata/run/import_extensionless.ts
diff --git a/cli/tests/testdata/import_extensionless.ts.out b/cli/tests/testdata/run/import_extensionless.ts.out
index 699b756ed..699b756ed 100644
--- a/cli/tests/testdata/import_extensionless.ts.out
+++ b/cli/tests/testdata/run/import_extensionless.ts.out
diff --git a/cli/tests/testdata/import_file_with_colon.ts b/cli/tests/testdata/run/import_file_with_colon.ts
index 619bdd66d..619bdd66d 100644
--- a/cli/tests/testdata/import_file_with_colon.ts
+++ b/cli/tests/testdata/run/import_file_with_colon.ts
diff --git a/cli/tests/testdata/import_file_with_colon.ts.out b/cli/tests/testdata/run/import_file_with_colon.ts.out
index f60bbf4b1..f60bbf4b1 100644
--- a/cli/tests/testdata/import_file_with_colon.ts.out
+++ b/cli/tests/testdata/run/import_file_with_colon.ts.out
diff --git a/cli/tests/testdata/import_meta.importmap.json b/cli/tests/testdata/run/import_meta/importmap.json
index f8c056afd..f8c056afd 100644
--- a/cli/tests/testdata/import_meta.importmap.json
+++ b/cli/tests/testdata/run/import_meta/importmap.json
diff --git a/cli/tests/testdata/import_meta.ts.out b/cli/tests/testdata/run/import_meta/main.out
index a431f61df..89aeddaf3 100644
--- a/cli/tests/testdata/import_meta.ts.out
+++ b/cli/tests/testdata/run/import_meta/main.out
@@ -1,5 +1,5 @@
-import_meta2 [WILDCARD]import_meta2.ts false
-import_meta [WILDCARD]import_meta.ts true
+other [WILDCARD]other.ts false
+main [WILDCARD]main.ts true
Resolving ./foo.js file:///[WILDCARD]/foo.js
Resolving bare from import map https://example.com/
Resolving https://example.com/rewrite from import map https://example.com/rewritten
diff --git a/cli/tests/testdata/import_meta.ts b/cli/tests/testdata/run/import_meta/main.ts
index 37af69020..02f0a1c58 100644
--- a/cli/tests/testdata/import_meta.ts
+++ b/cli/tests/testdata/run/import_meta/main.ts
@@ -1,8 +1,8 @@
-import { assertThrows } from "../../../test_util/std/testing/asserts.ts";
+import { assertThrows } from "../../../../../test_util/std/testing/asserts.ts";
-console.log("import_meta", import.meta.url, import.meta.main);
+console.log("main", import.meta.url, import.meta.main);
-import "./import_meta2.ts";
+import "./other.ts";
console.log("Resolving ./foo.js", import.meta.resolve("./foo.js"));
console.log("Resolving bare from import map", import.meta.resolve("bare"));
diff --git a/cli/tests/testdata/run/import_meta/other.ts b/cli/tests/testdata/run/import_meta/other.ts
new file mode 100644
index 000000000..47d7527cd
--- /dev/null
+++ b/cli/tests/testdata/run/import_meta/other.ts
@@ -0,0 +1 @@
+console.log("other", import.meta.url, import.meta.main);
diff --git a/cli/tests/testdata/run/import_type.ts b/cli/tests/testdata/run/import_type.ts
new file mode 100644
index 000000000..22c639cbc
--- /dev/null
+++ b/cli/tests/testdata/run/import_type.ts
@@ -0,0 +1,5 @@
+import { type B, create } from "../subdir/export_types.ts";
+
+const b: B = create();
+
+console.log(b);
diff --git a/cli/tests/testdata/import_type.ts.out b/cli/tests/testdata/run/import_type.ts.out
index 188c5e25d..188c5e25d 100644
--- a/cli/tests/testdata/import_type.ts.out
+++ b/cli/tests/testdata/run/import_type.ts.out
diff --git a/cli/tests/testdata/inline_js_source_map.ts b/cli/tests/testdata/run/inline_js_source_map.ts
index 5ae7c226a..5ae7c226a 100644
--- a/cli/tests/testdata/inline_js_source_map.ts
+++ b/cli/tests/testdata/run/inline_js_source_map.ts
diff --git a/cli/tests/testdata/run/inline_js_source_map_2.js b/cli/tests/testdata/run/inline_js_source_map_2.js
new file mode 100644
index 000000000..d14d906b8
--- /dev/null
+++ b/cli/tests/testdata/run/inline_js_source_map_2.js
@@ -0,0 +1,4 @@
+"use strict";
+1 + 1;
+throw new Error("Hello world!");
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaHR0cDovL2xvY2FsaG9zdDo0NTQ1L3J1bi9pbmxpbmVfanNfc291cmNlX21hcF8yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxDQUFDLEdBQUMsQ0FBQyxDQUFDO0FBS0osTUFBTSxJQUFJLEtBQUssQ0FBQyxjQUErQixDQUFDLENBQUMifQ== \ No newline at end of file
diff --git a/cli/tests/testdata/run/inline_js_source_map_2.js.out b/cli/tests/testdata/run/inline_js_source_map_2.js.out
new file mode 100644
index 000000000..72a531b0b
--- /dev/null
+++ b/cli/tests/testdata/run/inline_js_source_map_2.js.out
@@ -0,0 +1,2 @@
+error: Uncaught Error: Hello world!
+ at http://localhost:4545/run/inline_js_source_map_2.ts:6:7
diff --git a/cli/tests/testdata/inline_js_source_map_2.ts b/cli/tests/testdata/run/inline_js_source_map_2.ts
index fa50586e6..fa50586e6 100644
--- a/cli/tests/testdata/inline_js_source_map_2.ts
+++ b/cli/tests/testdata/run/inline_js_source_map_2.ts
diff --git a/cli/tests/testdata/run/inline_js_source_map_2_with_inline_contents.js b/cli/tests/testdata/run/inline_js_source_map_2_with_inline_contents.js
new file mode 100644
index 000000000..7660cc229
--- /dev/null
+++ b/cli/tests/testdata/run/inline_js_source_map_2_with_inline_contents.js
@@ -0,0 +1,4 @@
+"use strict";
+
+throw new Error("Hello world!");
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaHR0cDovL2xvY2FsaG9zdDo0NTQ1L3J1bi9pbmxpbmVfanNfc291cmNlX21hcF8yLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIjErMTtcbmludGVyZmFjZSBUZXN0IHtcbiAgaGVsbG86IHN0cmluZztcbn1cblxudGhyb3cgbmV3IEVycm9yKFwiSGVsbG8gd29ybGQhXCIgYXMgdW5rbm93biBhcyBzdHJpbmcpO1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxDQUFDLEdBQUMsQ0FBQyxDQUFDO0FBS0osTUFBTSxJQUFJLEtBQUssQ0FBQyxjQUErQixDQUFDLENBQUMifQ== \ No newline at end of file
diff --git a/cli/tests/testdata/run/inline_js_source_map_2_with_inline_contents.js.out b/cli/tests/testdata/run/inline_js_source_map_2_with_inline_contents.js.out
new file mode 100644
index 000000000..72a531b0b
--- /dev/null
+++ b/cli/tests/testdata/run/inline_js_source_map_2_with_inline_contents.js.out
@@ -0,0 +1,2 @@
+error: Uncaught Error: Hello world!
+ at http://localhost:4545/run/inline_js_source_map_2.ts:6:7
diff --git a/cli/tests/testdata/run/inline_js_source_map_with_contents_from_graph.js b/cli/tests/testdata/run/inline_js_source_map_with_contents_from_graph.js
new file mode 100644
index 000000000..887f02320
--- /dev/null
+++ b/cli/tests/testdata/run/inline_js_source_map_with_contents_from_graph.js
@@ -0,0 +1,4 @@
+"use strict";
+import "http://localhost:4545/run/inline_js_source_map.ts";
+throw new Error("Hello world!");
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaHR0cDovL2xvY2FsaG9zdDo0NTQ1L3J1bi9pbmxpbmVfanNfc291cmNlX21hcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsQ0FBQyxHQUFDLENBQUMsQ0FBQztBQUtKLE1BQU0sSUFBSSxLQUFLLENBQUMsY0FBK0IsQ0FBQyxDQUFDIn0= \ No newline at end of file
diff --git a/cli/tests/testdata/inline_js_source_map_with_contents_from_graph.js.out b/cli/tests/testdata/run/inline_js_source_map_with_contents_from_graph.js.out
index 7304fc5f6..9a5a26a68 100644
--- a/cli/tests/testdata/inline_js_source_map_with_contents_from_graph.js.out
+++ b/cli/tests/testdata/run/inline_js_source_map_with_contents_from_graph.js.out
@@ -1,4 +1,4 @@
error: Uncaught Error: Hello world!
// throw new Error("Hello world!" as string);
^
- at http://localhost:4545/inline_js_source_map.ts:6:7
+ at http://localhost:4545/run/inline_js_source_map.ts:6:7
diff --git a/cli/tests/testdata/run/issue13562.ts b/cli/tests/testdata/run/issue13562.ts
new file mode 100644
index 000000000..afbf69f99
--- /dev/null
+++ b/cli/tests/testdata/run/issue13562.ts
@@ -0,0 +1,3 @@
+import { printHello3 } from "../subdir/mod1.ts?q=.json";
+
+printHello3();
diff --git a/cli/tests/testdata/issue13562.ts.out b/cli/tests/testdata/run/issue13562.ts.out
index 699b756ed..699b756ed 100644
--- a/cli/tests/testdata/issue13562.ts.out
+++ b/cli/tests/testdata/run/issue13562.ts.out
diff --git a/cli/tests/testdata/issue9750.js b/cli/tests/testdata/run/issue9750.js
index 89fd61629..89fd61629 100644
--- a/cli/tests/testdata/issue9750.js
+++ b/cli/tests/testdata/run/issue9750.js
diff --git a/cli/tests/testdata/js_import_detect.ts b/cli/tests/testdata/run/js_import_detect.ts
index 751741996..751741996 100644
--- a/cli/tests/testdata/js_import_detect.ts
+++ b/cli/tests/testdata/run/js_import_detect.ts
diff --git a/cli/tests/testdata/js_import_detect.ts.out b/cli/tests/testdata/run/js_import_detect.ts.out
index 9766475a4..9766475a4 100644
--- a/cli/tests/testdata/js_import_detect.ts.out
+++ b/cli/tests/testdata/run/js_import_detect.ts.out
diff --git a/cli/tests/testdata/js_root_with_ts_check.js b/cli/tests/testdata/run/js_root_with_ts_check.js
index adca847ee..adca847ee 100644
--- a/cli/tests/testdata/js_root_with_ts_check.js
+++ b/cli/tests/testdata/run/js_root_with_ts_check.js
diff --git a/cli/tests/testdata/js_root_with_ts_check.js.out b/cli/tests/testdata/run/js_root_with_ts_check.js.out
index 34e2fa61e..34e2fa61e 100644
--- a/cli/tests/testdata/js_root_with_ts_check.js.out
+++ b/cli/tests/testdata/run/js_root_with_ts_check.js.out
diff --git a/cli/tests/testdata/jsx_import_from_ts.App.jsx b/cli/tests/testdata/run/jsx_import_from_ts.App.jsx
index 649230613..649230613 100644
--- a/cli/tests/testdata/jsx_import_from_ts.App.jsx
+++ b/cli/tests/testdata/run/jsx_import_from_ts.App.jsx
diff --git a/cli/tests/testdata/jsx_import_from_ts.ts b/cli/tests/testdata/run/jsx_import_from_ts.ts
index 3cc916698..3cc916698 100644
--- a/cli/tests/testdata/jsx_import_from_ts.ts
+++ b/cli/tests/testdata/run/jsx_import_from_ts.ts
diff --git a/cli/tests/testdata/jsx_import_from_ts.ts.out b/cli/tests/testdata/run/jsx_import_from_ts.ts.out
index d449b8c9a..d449b8c9a 100644
--- a/cli/tests/testdata/jsx_import_from_ts.ts.out
+++ b/cli/tests/testdata/run/jsx_import_from_ts.ts.out
diff --git a/cli/tests/testdata/jsx_import_source.out b/cli/tests/testdata/run/jsx_import_source.out
index b9555987a..b9555987a 100644
--- a/cli/tests/testdata/jsx_import_source.out
+++ b/cli/tests/testdata/run/jsx_import_source.out
diff --git a/cli/tests/testdata/jsx_import_source_dev.out b/cli/tests/testdata/run/jsx_import_source_dev.out
index 38d7a12f0..38d7a12f0 100644
--- a/cli/tests/testdata/jsx_import_source_dev.out
+++ b/cli/tests/testdata/run/jsx_import_source_dev.out
diff --git a/cli/tests/testdata/jsx_import_source_error.out b/cli/tests/testdata/run/jsx_import_source_error.out
index 634a5b09b..634a5b09b 100644
--- a/cli/tests/testdata/jsx_import_source_error.out
+++ b/cli/tests/testdata/run/jsx_import_source_error.out
diff --git a/cli/tests/testdata/jsx_import_source_import_map.out b/cli/tests/testdata/run/jsx_import_source_import_map.out
index 0d3238967..0d3238967 100644
--- a/cli/tests/testdata/jsx_import_source_import_map.out
+++ b/cli/tests/testdata/run/jsx_import_source_import_map.out
diff --git a/cli/tests/testdata/jsx_import_source_import_map_dev.out b/cli/tests/testdata/run/jsx_import_source_import_map_dev.out
index 56f514d90..56f514d90 100644
--- a/cli/tests/testdata/jsx_import_source_import_map_dev.out
+++ b/cli/tests/testdata/run/jsx_import_source_import_map_dev.out
diff --git a/cli/tests/testdata/jsx_import_source_no_pragma.tsx b/cli/tests/testdata/run/jsx_import_source_no_pragma.tsx
index 2c756054f..2c756054f 100644
--- a/cli/tests/testdata/jsx_import_source_no_pragma.tsx
+++ b/cli/tests/testdata/run/jsx_import_source_no_pragma.tsx
diff --git a/cli/tests/testdata/jsx_import_source_pragma.tsx b/cli/tests/testdata/run/jsx_import_source_pragma.tsx
index c19e53d4f..c19e53d4f 100644
--- a/cli/tests/testdata/jsx_import_source_pragma.tsx
+++ b/cli/tests/testdata/run/jsx_import_source_pragma.tsx
diff --git a/cli/tests/testdata/jsx_import_source_pragma_import_map.tsx b/cli/tests/testdata/run/jsx_import_source_pragma_import_map.tsx
index 548365f18..548365f18 100644
--- a/cli/tests/testdata/jsx_import_source_pragma_import_map.tsx
+++ b/cli/tests/testdata/run/jsx_import_source_pragma_import_map.tsx
diff --git a/cli/tests/testdata/lock_check_err.json b/cli/tests/testdata/run/lock_check_err.json
index 9bf52adca..fc6c2d45c 100644
--- a/cli/tests/testdata/lock_check_err.json
+++ b/cli/tests/testdata/run/lock_check_err.json
@@ -1,4 +1,4 @@
{
"http://127.0.0.1:4545/subdir/print_hello.ts": "fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c",
- "http://127.0.0.1:4545/003_relative_import.ts": "bad"
+ "http://127.0.0.1:4545/run/003_relative_import.ts": "bad"
}
diff --git a/cli/tests/testdata/run/lock_check_err.out b/cli/tests/testdata/run/lock_check_err.out
new file mode 100644
index 000000000..e4cc7b81a
--- /dev/null
+++ b/cli/tests/testdata/run/lock_check_err.out
@@ -0,0 +1,3 @@
+[WILDCARD]The source code is invalid, as it does not match the expected hash in the lock file.
+ Specifier: http://127.0.0.1:4545/run/003_relative_import.ts
+ Lock file: run/lock_check_err.json
diff --git a/cli/tests/testdata/lock_check_err2.json b/cli/tests/testdata/run/lock_check_err2.json
index a59cbc9e3..a59cbc9e3 100644
--- a/cli/tests/testdata/lock_check_err2.json
+++ b/cli/tests/testdata/run/lock_check_err2.json
diff --git a/cli/tests/testdata/lock_check_err2.out b/cli/tests/testdata/run/lock_check_err2.out
index 958c01654..065c7434b 100644
--- a/cli/tests/testdata/lock_check_err2.out
+++ b/cli/tests/testdata/run/lock_check_err2.out
@@ -1,3 +1,3 @@
[WILDCARD]The source code is invalid, as it does not match the expected hash in the lock file.
Specifier: http://localhost:4545/subdir/mt_text_ecmascript.j3.js
- Lock file: lock_check_err2.json
+ Lock file: run/lock_check_err2.json
diff --git a/cli/tests/testdata/lock_check_ok.json b/cli/tests/testdata/run/lock_check_ok.json
index 9dd5b0548..94de0f630 100644
--- a/cli/tests/testdata/lock_check_ok.json
+++ b/cli/tests/testdata/run/lock_check_ok.json
@@ -1,4 +1,4 @@
{
"http://127.0.0.1:4545/subdir/print_hello.ts": "fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c",
- "http://127.0.0.1:4545/003_relative_import.ts": "aa9e16de824f81871a1c7164d5bd6857df7db2e18621750bd66b0bde4df07f21"
+ "http://127.0.0.1:4545/run/003_relative_import.ts": "a1572e8fd2c2712b33f04aed2561505b5feb2c8696f1f2cded3de7127931b97e"
}
diff --git a/cli/tests/testdata/lock_check_ok2.json b/cli/tests/testdata/run/lock_check_ok2.json
index 162c755e2..162c755e2 100644
--- a/cli/tests/testdata/lock_check_ok2.json
+++ b/cli/tests/testdata/run/lock_check_ok2.json
diff --git a/cli/tests/testdata/lock_dynamic_imports.json b/cli/tests/testdata/run/lock_dynamic_imports.json
index 57263bc85..0269b9409 100644
--- a/cli/tests/testdata/lock_dynamic_imports.json
+++ b/cli/tests/testdata/run/lock_dynamic_imports.json
@@ -1,5 +1,5 @@
{
- "http://127.0.0.1:4545/013_dynamic_import.ts": "f0d2d108c100e769cda9f26b74326f21e44cab81611aa7f6cd2b731d4cbc1995",
+ "http://127.0.0.1:4545/run/013_dynamic_import.ts": "3f83e653329dc1f963761a986997d710b9763f667fc243eef89b3a5decacda30",
"http://127.0.0.1:4545/subdir/mod1.ts": "bfc1037b02c99abc20367f739bca7455813a5950066abd77965bff33b6eece0f",
"http://127.0.0.1:4545/subdir/print_hello.ts": "fa6692c8f9ff3fb107e773c3ece5274e9d08be282867a1e3ded1d9c00fcaa63c",
"http://127.0.0.1:4545/subdir/subdir2/mod2.ts": "bad"
diff --git a/cli/tests/testdata/lock_dynamic_imports.out b/cli/tests/testdata/run/lock_dynamic_imports.out
index 601d2282b..acc65c8e6 100644
--- a/cli/tests/testdata/lock_dynamic_imports.out
+++ b/cli/tests/testdata/run/lock_dynamic_imports.out
@@ -1,4 +1,4 @@
[WILDCARD]
error: The source code is invalid, as it does not match the expected hash in the lock file.
Specifier: http://127.0.0.1:4545/subdir/subdir2/mod2.ts
- Lock file: lock_dynamic_imports.json
+ Lock file: run/lock_dynamic_imports.json
diff --git a/cli/tests/testdata/file_exists.ts b/cli/tests/testdata/run/lock_write_fetch/file_exists.ts
index 20de4d4f2..20de4d4f2 100644
--- a/cli/tests/testdata/file_exists.ts
+++ b/cli/tests/testdata/run/lock_write_fetch/file_exists.ts
diff --git a/cli/tests/testdata/lock_write_fetch.ts.out b/cli/tests/testdata/run/lock_write_fetch/main.out
index bfdb952f9..bfdb952f9 100644
--- a/cli/tests/testdata/lock_write_fetch.ts.out
+++ b/cli/tests/testdata/run/lock_write_fetch/main.out
diff --git a/cli/tests/testdata/lock_write_fetch.ts b/cli/tests/testdata/run/lock_write_fetch/main.ts
index b403f5536..3e6892cf0 100644
--- a/cli/tests/testdata/lock_write_fetch.ts
+++ b/cli/tests/testdata/run/lock_write_fetch/main.ts
@@ -13,7 +13,7 @@ const fetchProc = await Deno.spawn(Deno.execPath(), {
"--lock=lock_write_fetch.json",
"--lock-write",
"--cert=tls/RootCA.pem",
- "https_import.ts",
+ "run/https_import.ts",
],
});
@@ -26,7 +26,7 @@ const fetchCheckProc = await Deno.spawn(Deno.execPath(), {
"cache",
"--lock=lock_write_fetch.json",
"--cert=tls/RootCA.pem",
- "https_import.ts",
+ "run/https_import.ts",
],
});
@@ -42,7 +42,7 @@ const runProc = await Deno.spawn(Deno.execPath(), {
"--lock=lock_write_fetch.json",
"--lock-write",
"--allow-read",
- "file_exists.ts",
+ "run/lock_write_fetch/file_exists.ts",
"lock_write_fetch.json",
],
});
diff --git a/cli/tests/testdata/lock_write_requires_lock.out b/cli/tests/testdata/run/lock_write_requires_lock.out
index 7cc5906f6..7cc5906f6 100644
--- a/cli/tests/testdata/lock_write_requires_lock.out
+++ b/cli/tests/testdata/run/lock_write_requires_lock.out
diff --git a/cli/tests/testdata/long_data_url_formatting.ts b/cli/tests/testdata/run/long_data_url_formatting.ts
index 2ed2d5a03..2ed2d5a03 100644
--- a/cli/tests/testdata/long_data_url_formatting.ts
+++ b/cli/tests/testdata/run/long_data_url_formatting.ts
diff --git a/cli/tests/testdata/long_data_url_formatting.ts.out b/cli/tests/testdata/run/long_data_url_formatting.ts.out
index ea78c2591..ea78c2591 100644
--- a/cli/tests/testdata/long_data_url_formatting.ts.out
+++ b/cli/tests/testdata/run/long_data_url_formatting.ts.out
diff --git a/cli/tests/testdata/run/main_module/main.out b/cli/tests/testdata/run/main_module/main.out
new file mode 100644
index 000000000..29f592c2a
--- /dev/null
+++ b/cli/tests/testdata/run/main_module/main.out
@@ -0,0 +1,2 @@
+other [WILDCARD]/main.ts
+main [WILDCARD]/main.ts
diff --git a/cli/tests/testdata/run/main_module/main.ts b/cli/tests/testdata/run/main_module/main.ts
new file mode 100644
index 000000000..d2f2c66ee
--- /dev/null
+++ b/cli/tests/testdata/run/main_module/main.ts
@@ -0,0 +1,3 @@
+console.log("main", Deno.mainModule);
+
+import "./other.ts";
diff --git a/cli/tests/testdata/run/main_module/other.ts b/cli/tests/testdata/run/main_module/other.ts
new file mode 100644
index 000000000..b3e524b0a
--- /dev/null
+++ b/cli/tests/testdata/run/main_module/other.ts
@@ -0,0 +1 @@
+console.log("other", Deno.mainModule);
diff --git a/cli/tests/testdata/mts_dmts_mjs.out b/cli/tests/testdata/run/mts_dmts_mjs.out
index 5647bdfb9..5647bdfb9 100644
--- a/cli/tests/testdata/mts_dmts_mjs.out
+++ b/cli/tests/testdata/run/mts_dmts_mjs.out
diff --git a/cli/tests/testdata/nested_error.ts b/cli/tests/testdata/run/nested_error.ts
index 69828e1ca..69828e1ca 100644
--- a/cli/tests/testdata/nested_error.ts
+++ b/cli/tests/testdata/run/nested_error.ts
diff --git a/cli/tests/testdata/run/nested_error.ts.out b/cli/tests/testdata/run/nested_error.ts.out
new file mode 100644
index 000000000..f5ebeec4d
--- /dev/null
+++ b/cli/tests/testdata/run/nested_error.ts.out
@@ -0,0 +1,4 @@
+error: Uncaught {
+ foo: Error
+ at file:///[WILDCARD]testdata/run/nested_error.ts:2:8
+}
diff --git a/cli/tests/testdata/no_check_decorators.ts b/cli/tests/testdata/run/no_check_decorators.ts
index 9f7ec550d..9f7ec550d 100644
--- a/cli/tests/testdata/no_check_decorators.ts
+++ b/cli/tests/testdata/run/no_check_decorators.ts
diff --git a/cli/tests/testdata/no_check_decorators.ts.out b/cli/tests/testdata/run/no_check_decorators.ts.out
index 015f7076e..015f7076e 100644
--- a/cli/tests/testdata/no_check_decorators.ts.out
+++ b/cli/tests/testdata/run/no_check_decorators.ts.out
diff --git a/cli/tests/testdata/087_hello.ts b/cli/tests/testdata/run/no_check_imports_not_used_as_values/hello.ts
index 1a9d8f114..1a9d8f114 100644
--- a/cli/tests/testdata/087_hello.ts
+++ b/cli/tests/testdata/run/no_check_imports_not_used_as_values/hello.ts
diff --git a/cli/tests/testdata/087_no_check_imports_not_used_as_values.ts.out b/cli/tests/testdata/run/no_check_imports_not_used_as_values/main.out
index f744c4183..f744c4183 100644
--- a/cli/tests/testdata/087_no_check_imports_not_used_as_values.ts.out
+++ b/cli/tests/testdata/run/no_check_imports_not_used_as_values/main.out
diff --git a/cli/tests/testdata/087_no_check_imports_not_used_as_values.ts b/cli/tests/testdata/run/no_check_imports_not_used_as_values/main.ts
index 64a13f9b1..80e17aa35 100644
--- a/cli/tests/testdata/087_no_check_imports_not_used_as_values.ts
+++ b/cli/tests/testdata/run/no_check_imports_not_used_as_values/main.ts
@@ -1,4 +1,4 @@
-import { SomeType } from "./087_hello.ts";
+import { SomeType } from "./hello.ts";
const string: SomeType = "Hi!";
console.log(string);
diff --git a/cli/tests/testdata/preserve_imports.tsconfig.json b/cli/tests/testdata/run/no_check_imports_not_used_as_values/preserve_imports.tsconfig.json
index 9b19291aa..9b19291aa 100644
--- a/cli/tests/testdata/preserve_imports.tsconfig.json
+++ b/cli/tests/testdata/run/no_check_imports_not_used_as_values/preserve_imports.tsconfig.json
diff --git a/cli/tests/testdata/no_check_remote.ts b/cli/tests/testdata/run/no_check_remote.ts
index 2ae8c2692..2ae8c2692 100644
--- a/cli/tests/testdata/no_check_remote.ts
+++ b/cli/tests/testdata/run/no_check_remote.ts
diff --git a/cli/tests/testdata/no_check_remote.ts.disabled.out b/cli/tests/testdata/run/no_check_remote.ts.disabled.out
index 344264634..344264634 100644
--- a/cli/tests/testdata/no_check_remote.ts.disabled.out
+++ b/cli/tests/testdata/run/no_check_remote.ts.disabled.out
diff --git a/cli/tests/testdata/no_check_remote.ts.enabled.out b/cli/tests/testdata/run/no_check_remote.ts.enabled.out
index 48082f72f..48082f72f 100644
--- a/cli/tests/testdata/no_check_remote.ts.enabled.out
+++ b/cli/tests/testdata/run/no_check_remote.ts.enabled.out
diff --git a/cli/tests/testdata/no_mem_cache.js b/cli/tests/testdata/run/no_mem_cache.js
index a486732b6..a486732b6 100644
--- a/cli/tests/testdata/no_mem_cache.js
+++ b/cli/tests/testdata/run/no_mem_cache.js
diff --git a/cli/tests/testdata/no_mem_cache.js.out b/cli/tests/testdata/run/no_mem_cache.js.out
index a32119c8a..a32119c8a 100644
--- a/cli/tests/testdata/no_mem_cache.js.out
+++ b/cli/tests/testdata/run/no_mem_cache.js.out
diff --git a/cli/tests/testdata/no_prompt.ts b/cli/tests/testdata/run/no_prompt.ts
index 7f9750995..7f9750995 100644
--- a/cli/tests/testdata/no_prompt.ts
+++ b/cli/tests/testdata/run/no_prompt.ts
diff --git a/cli/tests/testdata/no_validate_asm.js b/cli/tests/testdata/run/no_validate_asm.js
index ef999e080..ef999e080 100644
--- a/cli/tests/testdata/no_validate_asm.js
+++ b/cli/tests/testdata/run/no_validate_asm.js
diff --git a/cli/tests/testdata/node_env_var_allowlist.ts b/cli/tests/testdata/run/node_env_var_allowlist.ts
index 95da38c24..95da38c24 100644
--- a/cli/tests/testdata/node_env_var_allowlist.ts
+++ b/cli/tests/testdata/run/node_env_var_allowlist.ts
diff --git a/cli/tests/testdata/node_env_var_allowlist_with_unstable_flag.ts.out b/cli/tests/testdata/run/node_env_var_allowlist_with_unstable_flag.ts.out
index 62f335c0f..62f335c0f 100644
--- a/cli/tests/testdata/node_env_var_allowlist_with_unstable_flag.ts.out
+++ b/cli/tests/testdata/run/node_env_var_allowlist_with_unstable_flag.ts.out
diff --git a/cli/tests/testdata/node_env_var_allowlist_without_unstable_flag.ts.out b/cli/tests/testdata/run/node_env_var_allowlist_without_unstable_flag.ts.out
index ac92cdb6b..ac92cdb6b 100644
--- a/cli/tests/testdata/node_env_var_allowlist_without_unstable_flag.ts.out
+++ b/cli/tests/testdata/run/node_env_var_allowlist_without_unstable_flag.ts.out
diff --git a/cli/tests/testdata/034_onload/imported.ts b/cli/tests/testdata/run/onload/imported.ts
index a176d4200..969f97e56 100644
--- a/cli/tests/testdata/034_onload/imported.ts
+++ b/cli/tests/testdata/run/onload/imported.ts
@@ -1,5 +1,5 @@
// deno-lint-ignore-file no-window-prefix
-import { assert } from "../../../../test_util/std/testing/asserts.ts";
+import { assert } from "../../../../../test_util/std/testing/asserts.ts";
import "./nest_imported.ts";
const handler = (e: Event) => {
diff --git a/cli/tests/testdata/034_onload.out b/cli/tests/testdata/run/onload/main.out
index 9b1f454c9..9b1f454c9 100644
--- a/cli/tests/testdata/034_onload.out
+++ b/cli/tests/testdata/run/onload/main.out
diff --git a/cli/tests/testdata/034_onload/main.ts b/cli/tests/testdata/run/onload/main.ts
index df6713105..798b8aa7b 100644
--- a/cli/tests/testdata/034_onload/main.ts
+++ b/cli/tests/testdata/run/onload/main.ts
@@ -1,5 +1,5 @@
// deno-lint-ignore-file no-window-prefix no-prototype-builtins
-import { assert } from "../../../../test_util/std/testing/asserts.ts";
+import { assert } from "../../../../../test_util/std/testing/asserts.ts";
import "./imported.ts";
assert(window.hasOwnProperty("onload"));
diff --git a/cli/tests/testdata/034_onload/nest_imported.ts b/cli/tests/testdata/run/onload/nest_imported.ts
index e461dd9b1..351a3cb22 100644
--- a/cli/tests/testdata/034_onload/nest_imported.ts
+++ b/cli/tests/testdata/run/onload/nest_imported.ts
@@ -1,5 +1,5 @@
// deno-lint-ignore-file no-window-prefix
-import { assert } from "../../../../test_util/std/testing/asserts.ts";
+import { assert } from "../../../../../test_util/std/testing/asserts.ts";
const handler = (e: Event) => {
assert(!e.cancelable);
diff --git a/cli/tests/testdata/op_exit_op_set_exit_code_in_worker.ts b/cli/tests/testdata/run/op_exit_op_set_exit_code_in_worker.ts
index b2ed912de..b2ed912de 100644
--- a/cli/tests/testdata/op_exit_op_set_exit_code_in_worker.ts
+++ b/cli/tests/testdata/run/op_exit_op_set_exit_code_in_worker.ts
diff --git a/cli/tests/testdata/op_exit_op_set_exit_code_worker.js b/cli/tests/testdata/run/op_exit_op_set_exit_code_worker.js
index 3e6055747..3e6055747 100644
--- a/cli/tests/testdata/op_exit_op_set_exit_code_worker.js
+++ b/cli/tests/testdata/run/op_exit_op_set_exit_code_worker.js
diff --git a/cli/tests/testdata/permission_test.ts b/cli/tests/testdata/run/permission_test.ts
index 4b186a0a2..9b5409b4f 100644
--- a/cli/tests/testdata/permission_test.ts
+++ b/cli/tests/testdata/run/permission_test.ts
@@ -3,7 +3,7 @@ const name = Deno.args[0];
// deno-lint-ignore no-explicit-any
const test: { [key: string]: (...args: any[]) => void | Promise<void> } = {
readRequired() {
- Deno.readFileSync("hello.txt");
+ Deno.readFileSync("assets/hello.txt");
return Promise.resolve();
},
writeRequired() {
diff --git a/cli/tests/testdata/private_field_presence.ts b/cli/tests/testdata/run/private_field_presence.ts
index 7ce2840d8..7ce2840d8 100644
--- a/cli/tests/testdata/private_field_presence.ts
+++ b/cli/tests/testdata/run/private_field_presence.ts
diff --git a/cli/tests/testdata/private_field_presence.ts.out b/cli/tests/testdata/run/private_field_presence.ts.out
index f582fb47a..f582fb47a 100644
--- a/cli/tests/testdata/private_field_presence.ts.out
+++ b/cli/tests/testdata/run/private_field_presence.ts.out
diff --git a/cli/tests/testdata/proto_exploit.js b/cli/tests/testdata/run/proto_exploit.js
index 8bd22cfe5..8bd22cfe5 100644
--- a/cli/tests/testdata/proto_exploit.js
+++ b/cli/tests/testdata/run/proto_exploit.js
diff --git a/cli/tests/testdata/proto_exploit.js.out b/cli/tests/testdata/run/proto_exploit.js.out
index fde881dc5..fde881dc5 100644
--- a/cli/tests/testdata/proto_exploit.js.out
+++ b/cli/tests/testdata/run/proto_exploit.js.out
diff --git a/cli/tests/testdata/queue_microtask_error.ts b/cli/tests/testdata/run/queue_microtask_error.ts
index b2e9642c5..b2e9642c5 100644
--- a/cli/tests/testdata/queue_microtask_error.ts
+++ b/cli/tests/testdata/run/queue_microtask_error.ts
diff --git a/cli/tests/testdata/queue_microtask_error.ts.out b/cli/tests/testdata/run/queue_microtask_error.ts.out
index 6c4d41936..6c4d41936 100644
--- a/cli/tests/testdata/queue_microtask_error.ts.out
+++ b/cli/tests/testdata/run/queue_microtask_error.ts.out
diff --git a/cli/tests/testdata/queue_microtask_error_handled.ts b/cli/tests/testdata/run/queue_microtask_error_handled.ts
index 7d1440135..7d1440135 100644
--- a/cli/tests/testdata/queue_microtask_error_handled.ts
+++ b/cli/tests/testdata/run/queue_microtask_error_handled.ts
diff --git a/cli/tests/testdata/queue_microtask_error_handled.ts.out b/cli/tests/testdata/run/queue_microtask_error_handled.ts.out
index 7f3f7f84a..7f3f7f84a 100644
--- a/cli/tests/testdata/queue_microtask_error_handled.ts.out
+++ b/cli/tests/testdata/run/queue_microtask_error_handled.ts.out
diff --git a/cli/tests/testdata/reference_types.ts b/cli/tests/testdata/run/reference_types.ts
index 105e23b37..105e23b37 100644
--- a/cli/tests/testdata/reference_types.ts
+++ b/cli/tests/testdata/run/reference_types.ts
diff --git a/cli/tests/testdata/reference_types.ts.out b/cli/tests/testdata/run/reference_types.ts.out
index 417b7b537..417b7b537 100644
--- a/cli/tests/testdata/reference_types.ts.out
+++ b/cli/tests/testdata/run/reference_types.ts.out
diff --git a/cli/tests/testdata/reference_types_error.js b/cli/tests/testdata/run/reference_types_error.js
index 68b6c2136..68b6c2136 100644
--- a/cli/tests/testdata/reference_types_error.js
+++ b/cli/tests/testdata/run/reference_types_error.js
diff --git a/cli/tests/testdata/reference_types_error.js.out b/cli/tests/testdata/run/reference_types_error.js.out
index ebb9b3a26..ebb9b3a26 100644
--- a/cli/tests/testdata/reference_types_error.js.out
+++ b/cli/tests/testdata/run/reference_types_error.js.out
diff --git a/cli/tests/testdata/reference_types_remote.ts b/cli/tests/testdata/run/reference_types_remote.ts
index e7fa81b2c..e7fa81b2c 100644
--- a/cli/tests/testdata/reference_types_remote.ts
+++ b/cli/tests/testdata/run/reference_types_remote.ts
diff --git a/cli/tests/testdata/reference_types_remote.ts.out b/cli/tests/testdata/run/reference_types_remote.ts.out
index 417b7b537..417b7b537 100644
--- a/cli/tests/testdata/reference_types_remote.ts.out
+++ b/cli/tests/testdata/run/reference_types_remote.ts.out
diff --git a/cli/tests/testdata/replace_self.js b/cli/tests/testdata/run/replace_self.js
index cfd473cd3..cfd473cd3 100644
--- a/cli/tests/testdata/replace_self.js
+++ b/cli/tests/testdata/run/replace_self.js
diff --git a/cli/tests/testdata/replace_self.js.out b/cli/tests/testdata/run/replace_self.js.out
index aaffb5a62..aaffb5a62 100644
--- a/cli/tests/testdata/replace_self.js.out
+++ b/cli/tests/testdata/run/replace_self.js.out
diff --git a/cli/tests/testdata/report_error.ts b/cli/tests/testdata/run/report_error.ts
index a6d4af1fd..a6d4af1fd 100644
--- a/cli/tests/testdata/report_error.ts
+++ b/cli/tests/testdata/run/report_error.ts
diff --git a/cli/tests/testdata/report_error.ts.out b/cli/tests/testdata/run/report_error.ts.out
index 185db62a5..185db62a5 100644
--- a/cli/tests/testdata/report_error.ts.out
+++ b/cli/tests/testdata/run/report_error.ts.out
diff --git a/cli/tests/testdata/report_error_end_of_program.ts b/cli/tests/testdata/run/report_error_end_of_program.ts
index cd7ce7f9c..cd7ce7f9c 100644
--- a/cli/tests/testdata/report_error_end_of_program.ts
+++ b/cli/tests/testdata/run/report_error_end_of_program.ts
diff --git a/cli/tests/testdata/report_error_end_of_program.ts.out b/cli/tests/testdata/run/report_error_end_of_program.ts.out
index ecca63389..ecca63389 100644
--- a/cli/tests/testdata/report_error_end_of_program.ts.out
+++ b/cli/tests/testdata/run/report_error_end_of_program.ts.out
diff --git a/cli/tests/testdata/report_error_handled.ts b/cli/tests/testdata/run/report_error_handled.ts
index de58f0b8e..de58f0b8e 100644
--- a/cli/tests/testdata/report_error_handled.ts
+++ b/cli/tests/testdata/run/report_error_handled.ts
diff --git a/cli/tests/testdata/report_error_handled.ts.out b/cli/tests/testdata/run/report_error_handled.ts.out
index 89fa30314..89fa30314 100644
--- a/cli/tests/testdata/report_error_handled.ts.out
+++ b/cli/tests/testdata/run/report_error_handled.ts.out
diff --git a/cli/tests/testdata/resolve_dns.ts b/cli/tests/testdata/run/resolve_dns.ts
index bde479c9a..bde479c9a 100644
--- a/cli/tests/testdata/resolve_dns.ts
+++ b/cli/tests/testdata/run/resolve_dns.ts
diff --git a/cli/tests/testdata/resolve_dns.ts.out b/cli/tests/testdata/run/resolve_dns.ts.out
index 2fe10cb9a..2fe10cb9a 100644
--- a/cli/tests/testdata/resolve_dns.ts.out
+++ b/cli/tests/testdata/run/resolve_dns.ts.out
diff --git a/cli/tests/testdata/resolve_dns.zone.in b/cli/tests/testdata/run/resolve_dns.zone.in
index c351a1de9..c351a1de9 100644
--- a/cli/tests/testdata/resolve_dns.zone.in
+++ b/cli/tests/testdata/run/resolve_dns.zone.in
diff --git a/cli/tests/testdata/runtime_decorators.ts b/cli/tests/testdata/run/runtime_decorators.ts
index 5da109110..5da109110 100644
--- a/cli/tests/testdata/runtime_decorators.ts
+++ b/cli/tests/testdata/run/runtime_decorators.ts
diff --git a/cli/tests/testdata/runtime_decorators.ts.out b/cli/tests/testdata/run/runtime_decorators.ts.out
index 0fc1d4590..0fc1d4590 100644
--- a/cli/tests/testdata/runtime_decorators.ts.out
+++ b/cli/tests/testdata/run/runtime_decorators.ts.out
diff --git a/cli/tests/testdata/seed_random.js b/cli/tests/testdata/run/seed_random.js
index 7f6e336df..7f6e336df 100644
--- a/cli/tests/testdata/seed_random.js
+++ b/cli/tests/testdata/run/seed_random.js
diff --git a/cli/tests/testdata/seed_random.js.out b/cli/tests/testdata/run/seed_random.js.out
index 4d1ebd081..4d1ebd081 100644
--- a/cli/tests/testdata/seed_random.js.out
+++ b/cli/tests/testdata/run/seed_random.js.out
diff --git a/cli/tests/testdata/set_exit_code_0.ts b/cli/tests/testdata/run/set_exit_code_0.ts
index 362a9f28a..362a9f28a 100644
--- a/cli/tests/testdata/set_exit_code_0.ts
+++ b/cli/tests/testdata/run/set_exit_code_0.ts
diff --git a/cli/tests/testdata/set_exit_code_1.ts b/cli/tests/testdata/run/set_exit_code_1.ts
index b10863568..b10863568 100644
--- a/cli/tests/testdata/set_exit_code_1.ts
+++ b/cli/tests/testdata/run/set_exit_code_1.ts
diff --git a/cli/tests/testdata/set_exit_code_2.ts b/cli/tests/testdata/run/set_exit_code_2.ts
index d68812cae..d68812cae 100644
--- a/cli/tests/testdata/set_exit_code_2.ts
+++ b/cli/tests/testdata/run/set_exit_code_2.ts
diff --git a/cli/tests/testdata/set_timeout_error.ts b/cli/tests/testdata/run/set_timeout_error.ts
index 2864574e7..2864574e7 100644
--- a/cli/tests/testdata/set_timeout_error.ts
+++ b/cli/tests/testdata/run/set_timeout_error.ts
diff --git a/cli/tests/testdata/set_timeout_error.ts.out b/cli/tests/testdata/run/set_timeout_error.ts.out
index 9db053f6c..9db053f6c 100644
--- a/cli/tests/testdata/set_timeout_error.ts.out
+++ b/cli/tests/testdata/run/set_timeout_error.ts.out
diff --git a/cli/tests/testdata/set_timeout_error_handled.ts b/cli/tests/testdata/run/set_timeout_error_handled.ts
index aee2d97d2..aee2d97d2 100644
--- a/cli/tests/testdata/set_timeout_error_handled.ts
+++ b/cli/tests/testdata/run/set_timeout_error_handled.ts
diff --git a/cli/tests/testdata/set_timeout_error_handled.ts.out b/cli/tests/testdata/run/set_timeout_error_handled.ts.out
index 054dd9b6b..054dd9b6b 100644
--- a/cli/tests/testdata/set_timeout_error_handled.ts.out
+++ b/cli/tests/testdata/run/set_timeout_error_handled.ts.out
diff --git a/cli/tests/testdata/shebang.ts b/cli/tests/testdata/run/shebang.ts
index 00feb2da0..00feb2da0 100644
--- a/cli/tests/testdata/shebang.ts
+++ b/cli/tests/testdata/run/shebang.ts
diff --git a/cli/tests/testdata/shebang.ts.out b/cli/tests/testdata/run/shebang.ts.out
index d81cc0710..d81cc0710 100644
--- a/cli/tests/testdata/shebang.ts.out
+++ b/cli/tests/testdata/run/shebang.ts.out
diff --git a/cli/tests/testdata/shebang2.ts b/cli/tests/testdata/run/shebang2.ts
index da0d7bf0c..da0d7bf0c 100644
--- a/cli/tests/testdata/shebang2.ts
+++ b/cli/tests/testdata/run/shebang2.ts
diff --git a/cli/tests/testdata/single_compile_with_reload.ts b/cli/tests/testdata/run/single_compile_with_reload.ts
index ea6a73474..ea6a73474 100644
--- a/cli/tests/testdata/single_compile_with_reload.ts
+++ b/cli/tests/testdata/run/single_compile_with_reload.ts
diff --git a/cli/tests/testdata/single_compile_with_reload.ts.out b/cli/tests/testdata/run/single_compile_with_reload.ts.out
index b0b2fcaf1..b0b2fcaf1 100644
--- a/cli/tests/testdata/single_compile_with_reload.ts.out
+++ b/cli/tests/testdata/run/single_compile_with_reload.ts.out
diff --git a/cli/tests/testdata/single_compile_with_reload_dyn.ts b/cli/tests/testdata/run/single_compile_with_reload_dyn.ts
index 0266bf46c..6c96fac64 100644
--- a/cli/tests/testdata/single_compile_with_reload_dyn.ts
+++ b/cli/tests/testdata/run/single_compile_with_reload_dyn.ts
@@ -1,4 +1,4 @@
-import { printHello3, returnsFoo2, returnsHi } from "./subdir/mod1.ts";
+import { printHello3, returnsFoo2, returnsHi } from "../subdir/mod1.ts";
printHello3();
diff --git a/cli/tests/testdata/single_compile_with_reload_worker.ts b/cli/tests/testdata/run/single_compile_with_reload_worker.ts
index 103cafe20..103cafe20 100644
--- a/cli/tests/testdata/single_compile_with_reload_worker.ts
+++ b/cli/tests/testdata/run/single_compile_with_reload_worker.ts
diff --git a/cli/tests/testdata/spawn_stdout_inherit.ts b/cli/tests/testdata/run/spawn_stdout_inherit.ts
index be5f9b7ef..be5f9b7ef 100644
--- a/cli/tests/testdata/spawn_stdout_inherit.ts
+++ b/cli/tests/testdata/run/spawn_stdout_inherit.ts
diff --git a/cli/tests/testdata/spawn_stdout_inherit.ts.out b/cli/tests/testdata/run/spawn_stdout_inherit.ts.out
index 474891cf2..474891cf2 100644
--- a/cli/tests/testdata/spawn_stdout_inherit.ts.out
+++ b/cli/tests/testdata/run/spawn_stdout_inherit.ts.out
diff --git a/cli/tests/testdata/swc_syntax_error.ts b/cli/tests/testdata/run/swc_syntax_error.ts
index 991ca9214..991ca9214 100644
--- a/cli/tests/testdata/swc_syntax_error.ts
+++ b/cli/tests/testdata/run/swc_syntax_error.ts
diff --git a/cli/tests/testdata/swc_syntax_error.ts.out b/cli/tests/testdata/run/swc_syntax_error.ts.out
index c968db5e9..c968db5e9 100644
--- a/cli/tests/testdata/swc_syntax_error.ts.out
+++ b/cli/tests/testdata/run/swc_syntax_error.ts.out
diff --git a/cli/tests/testdata/test_and_bench_in_run.js b/cli/tests/testdata/run/test_and_bench_in_run.js
index 108ae937a..108ae937a 100644
--- a/cli/tests/testdata/test_and_bench_in_run.js
+++ b/cli/tests/testdata/run/test_and_bench_in_run.js
diff --git a/cli/tests/testdata/tls.out b/cli/tests/testdata/run/tls.out
index c8e8a135c..c8e8a135c 100644
--- a/cli/tests/testdata/tls.out
+++ b/cli/tests/testdata/run/tls.out
diff --git a/cli/tests/testdata/tls_connecttls.js b/cli/tests/testdata/run/tls_connecttls.js
index 1e8cf320c..fb3839968 100644
--- a/cli/tests/testdata/tls_connecttls.js
+++ b/cli/tests/testdata/run/tls_connecttls.js
@@ -1,10 +1,10 @@
-import { deferred } from "../../../test_util/std/async/deferred.ts";
+import { deferred } from "../../../../test_util/std/async/deferred.ts";
import {
assert,
assertEquals,
-} from "../../../test_util/std/testing/asserts.ts";
-import { BufReader, BufWriter } from "../../../test_util/std/io/bufio.ts";
-import { TextProtoReader } from "../../../test_util/std/textproto/mod.ts";
+} from "../../../../test_util/std/testing/asserts.ts";
+import { BufReader, BufWriter } from "../../../../test_util/std/io/bufio.ts";
+import { TextProtoReader } from "../../../../test_util/std/textproto/mod.ts";
const encoder = new TextEncoder();
const decoder = new TextDecoder();
diff --git a/cli/tests/testdata/tls_starttls.js b/cli/tests/testdata/run/tls_starttls.js
index 9b8767eaa..7aa436512 100644
--- a/cli/tests/testdata/tls_starttls.js
+++ b/cli/tests/testdata/run/tls_starttls.js
@@ -1,10 +1,10 @@
-import { deferred } from "../../../test_util/std/async/deferred.ts";
+import { deferred } from "../../../../test_util/std/async/deferred.ts";
import {
assert,
assertEquals,
-} from "../../../test_util/std/testing/asserts.ts";
-import { BufReader, BufWriter } from "../../../test_util/std/io/bufio.ts";
-import { TextProtoReader } from "../../../test_util/std/textproto/mod.ts";
+} from "../../../../test_util/std/testing/asserts.ts";
+import { BufReader, BufWriter } from "../../../../test_util/std/io/bufio.ts";
+import { TextProtoReader } from "../../../../test_util/std/textproto/mod.ts";
const encoder = new TextEncoder();
const decoder = new TextDecoder();
diff --git a/cli/tests/testdata/top_level_await_circular.js b/cli/tests/testdata/run/top_level_await/circular.js
index ff2964b6a..ff2964b6a 100644
--- a/cli/tests/testdata/top_level_await_circular.js
+++ b/cli/tests/testdata/run/top_level_await/circular.js
diff --git a/cli/tests/testdata/top_level_await_circular.out b/cli/tests/testdata/run/top_level_await/circular.out
index 72072071e..72072071e 100644
--- a/cli/tests/testdata/top_level_await_circular.out
+++ b/cli/tests/testdata/run/top_level_await/circular.out
diff --git a/cli/tests/testdata/top_level_await_loop.js b/cli/tests/testdata/run/top_level_await/loop.js
index 384f8d0ed..415db5ec7 100644
--- a/cli/tests/testdata/top_level_await_loop.js
+++ b/cli/tests/testdata/run/top_level_await/loop.js
@@ -1,9 +1,11 @@
-const importsDir = Deno.readDirSync(Deno.realPathSync("./tla2"));
+const importsDir = Deno.readDirSync(
+ Deno.realPathSync("./run/top_level_await/tla2"),
+);
const resolvedPaths = [];
for (const { name } of importsDir) {
- const filePath = Deno.realPathSync(`./tla2/${name}`);
+ const filePath = Deno.realPathSync(`./run/top_level_await/tla2/${name}`);
resolvedPaths.push(filePath);
}
diff --git a/cli/tests/testdata/top_level_await_loop.out b/cli/tests/testdata/run/top_level_await/loop.out
index 70e621e45..70e621e45 100644
--- a/cli/tests/testdata/top_level_await_loop.out
+++ b/cli/tests/testdata/run/top_level_await/loop.out
diff --git a/cli/tests/testdata/top_level_await_nested.out b/cli/tests/testdata/run/top_level_await/nested.out
index 8a1218a10..8a1218a10 100644
--- a/cli/tests/testdata/top_level_await_nested.out
+++ b/cli/tests/testdata/run/top_level_await/nested.out
diff --git a/cli/tests/testdata/top_level_await_nested/a.js b/cli/tests/testdata/run/top_level_await/nested/a.js
index 74837d4ba..74837d4ba 100644
--- a/cli/tests/testdata/top_level_await_nested/a.js
+++ b/cli/tests/testdata/run/top_level_await/nested/a.js
diff --git a/cli/tests/testdata/top_level_await_nested/b.js b/cli/tests/testdata/run/top_level_await/nested/b.js
index 3bd241b50..3bd241b50 100644
--- a/cli/tests/testdata/top_level_await_nested/b.js
+++ b/cli/tests/testdata/run/top_level_await/nested/b.js
diff --git a/cli/tests/testdata/top_level_await_nested/main.js b/cli/tests/testdata/run/top_level_await/nested/main.js
index ed46a4717..ed46a4717 100644
--- a/cli/tests/testdata/top_level_await_nested/main.js
+++ b/cli/tests/testdata/run/top_level_await/nested/main.js
diff --git a/cli/tests/testdata/top_level_await_order.js b/cli/tests/testdata/run/top_level_await/order.js
index 30659cdfb..30659cdfb 100644
--- a/cli/tests/testdata/top_level_await_order.js
+++ b/cli/tests/testdata/run/top_level_await/order.js
diff --git a/cli/tests/testdata/top_level_await_order.out b/cli/tests/testdata/run/top_level_await/order.out
index 4cc27858c..4cc27858c 100644
--- a/cli/tests/testdata/top_level_await_order.out
+++ b/cli/tests/testdata/run/top_level_await/order.out
diff --git a/cli/tests/testdata/tla/a.js b/cli/tests/testdata/run/top_level_await/tla/a.js
index c3ef3f7db..c3ef3f7db 100644
--- a/cli/tests/testdata/tla/a.js
+++ b/cli/tests/testdata/run/top_level_await/tla/a.js
diff --git a/cli/tests/testdata/tla/b.js b/cli/tests/testdata/run/top_level_await/tla/b.js
index 3271c92d8..3271c92d8 100644
--- a/cli/tests/testdata/tla/b.js
+++ b/cli/tests/testdata/run/top_level_await/tla/b.js
diff --git a/cli/tests/testdata/tla/c.js b/cli/tests/testdata/run/top_level_await/tla/c.js
index 806eb0a8b..806eb0a8b 100644
--- a/cli/tests/testdata/tla/c.js
+++ b/cli/tests/testdata/run/top_level_await/tla/c.js
diff --git a/cli/tests/testdata/tla/d.js b/cli/tests/testdata/run/top_level_await/tla/d.js
index 283ebf817..283ebf817 100644
--- a/cli/tests/testdata/tla/d.js
+++ b/cli/tests/testdata/run/top_level_await/tla/d.js
diff --git a/cli/tests/testdata/tla/order.js b/cli/tests/testdata/run/top_level_await/tla/order.js
index f213a562c..f213a562c 100644
--- a/cli/tests/testdata/tla/order.js
+++ b/cli/tests/testdata/run/top_level_await/tla/order.js
diff --git a/cli/tests/testdata/tla/parent.js b/cli/tests/testdata/run/top_level_await/tla/parent.js
index 1ecc15463..1ecc15463 100644
--- a/cli/tests/testdata/tla/parent.js
+++ b/cli/tests/testdata/run/top_level_await/tla/parent.js
diff --git a/cli/tests/testdata/tla2/a.js b/cli/tests/testdata/run/top_level_await/tla2/a.js
index d07bcb94d..d07bcb94d 100644
--- a/cli/tests/testdata/tla2/a.js
+++ b/cli/tests/testdata/run/top_level_await/tla2/a.js
diff --git a/cli/tests/testdata/tla2/b.js b/cli/tests/testdata/run/top_level_await/tla2/b.js
index 68e357c1e..68e357c1e 100644
--- a/cli/tests/testdata/tla2/b.js
+++ b/cli/tests/testdata/run/top_level_await/tla2/b.js
diff --git a/cli/tests/testdata/tla3/b.js b/cli/tests/testdata/run/top_level_await/tla3/b.js
index b74c659e4..d0349545e 100644
--- a/cli/tests/testdata/tla3/b.js
+++ b/cli/tests/testdata/run/top_level_await/tla3/b.js
@@ -1,5 +1,5 @@
import { foo } from "./timeout_loop.js";
-import { collection } from "../top_level_await_circular.js";
+import { collection } from "../circular.js";
console.log("collection in b", collection);
console.log("foo in b", foo);
diff --git a/cli/tests/testdata/tla3/timeout_loop.js b/cli/tests/testdata/run/top_level_await/tla3/timeout_loop.js
index 860e6cd2a..860e6cd2a 100644
--- a/cli/tests/testdata/tla3/timeout_loop.js
+++ b/cli/tests/testdata/run/top_level_await/tla3/timeout_loop.js
diff --git a/cli/tests/testdata/top_level_await.js b/cli/tests/testdata/run/top_level_await/top_level_await.js
index af6fbd662..ea319ea12 100644
--- a/cli/tests/testdata/top_level_await.js
+++ b/cli/tests/testdata/run/top_level_await/top_level_await.js
@@ -1,3 +1,3 @@
-const buf = await Deno.readFile("hello.txt");
+const buf = await Deno.readFile("./assets/hello.txt");
const n = await Deno.stdout.write(buf);
console.log(`\n\nwrite ${n}`);
diff --git a/cli/tests/testdata/top_level_await.out b/cli/tests/testdata/run/top_level_await/top_level_await.out
index 4b65d15fe..4b65d15fe 100644
--- a/cli/tests/testdata/top_level_await.out
+++ b/cli/tests/testdata/run/top_level_await/top_level_await.out
diff --git a/cli/tests/testdata/top_level_await.ts b/cli/tests/testdata/run/top_level_await/top_level_await.ts
index 65de253ea..8d47ceb21 100644
--- a/cli/tests/testdata/top_level_await.ts
+++ b/cli/tests/testdata/run/top_level_await/top_level_await.ts
@@ -1,3 +1,3 @@
-const buf: Uint8Array = await Deno.readFile("hello.txt");
+const buf: Uint8Array = await Deno.readFile("./assets/hello.txt");
const n: number = await Deno.stdout.write(buf);
console.log(`\n\nwrite ${n}`);
diff --git a/cli/tests/testdata/top_level_for_await.js b/cli/tests/testdata/run/top_level_await/top_level_for_await.js
index a330f6c71..a330f6c71 100644
--- a/cli/tests/testdata/top_level_for_await.js
+++ b/cli/tests/testdata/run/top_level_await/top_level_for_await.js
diff --git a/cli/tests/testdata/top_level_for_await.out b/cli/tests/testdata/run/top_level_await/top_level_for_await.out
index 4539bbf2d..4539bbf2d 100644
--- a/cli/tests/testdata/top_level_for_await.out
+++ b/cli/tests/testdata/run/top_level_await/top_level_for_await.out
diff --git a/cli/tests/testdata/top_level_for_await.ts b/cli/tests/testdata/run/top_level_await/top_level_for_await.ts
index 9179322d7..9179322d7 100644
--- a/cli/tests/testdata/top_level_for_await.ts
+++ b/cli/tests/testdata/run/top_level_await/top_level_for_await.ts
diff --git a/cli/tests/testdata/top_level_await_unresolved.js b/cli/tests/testdata/run/top_level_await/unresolved.js
index 231a8cd63..231a8cd63 100644
--- a/cli/tests/testdata/top_level_await_unresolved.js
+++ b/cli/tests/testdata/run/top_level_await/unresolved.js
diff --git a/cli/tests/testdata/top_level_await_unresolved.out b/cli/tests/testdata/run/top_level_await/unresolved.out
index d5291f833..d5291f833 100644
--- a/cli/tests/testdata/top_level_await_unresolved.out
+++ b/cli/tests/testdata/run/top_level_await/unresolved.out
diff --git a/cli/tests/testdata/ts_decorators.ts b/cli/tests/testdata/run/ts_decorators.ts
index 95fba6cd4..95fba6cd4 100644
--- a/cli/tests/testdata/ts_decorators.ts
+++ b/cli/tests/testdata/run/ts_decorators.ts
diff --git a/cli/tests/testdata/ts_decorators.ts.out b/cli/tests/testdata/run/ts_decorators.ts.out
index 381c7a809..381c7a809 100644
--- a/cli/tests/testdata/ts_decorators.ts.out
+++ b/cli/tests/testdata/run/ts_decorators.ts.out
diff --git a/cli/tests/testdata/ts_import_from_js.deps.js b/cli/tests/testdata/run/ts_import_from_js/deps.js
index ef326c444..746b5cf6b 100644
--- a/cli/tests/testdata/ts_import_from_js.deps.js
+++ b/cli/tests/testdata/run/ts_import_from_js/deps.js
@@ -1,2 +1,2 @@
-import "./005_more_imports.ts";
+import "../005_more_imports.ts";
export { printHello } from "http://localhost:4545/subdir/mod2.ts";
diff --git a/cli/tests/testdata/run/ts_import_from_js/main.js b/cli/tests/testdata/run/ts_import_from_js/main.js
new file mode 100644
index 000000000..32d6c29a1
--- /dev/null
+++ b/cli/tests/testdata/run/ts_import_from_js/main.js
@@ -0,0 +1,3 @@
+import { printHello } from "./deps.js";
+printHello();
+console.log("success");
diff --git a/cli/tests/testdata/ts_import_from_js.js.out b/cli/tests/testdata/run/ts_import_from_js/main.out
index e1d7a869f..e1d7a869f 100644
--- a/cli/tests/testdata/ts_import_from_js.js.out
+++ b/cli/tests/testdata/run/ts_import_from_js/main.out
diff --git a/cli/tests/testdata/ts_type_imports.ts b/cli/tests/testdata/run/ts_type_imports.ts
index 73c779156..73c779156 100644
--- a/cli/tests/testdata/ts_type_imports.ts
+++ b/cli/tests/testdata/run/ts_type_imports.ts
diff --git a/cli/tests/testdata/ts_type_imports.ts.out b/cli/tests/testdata/run/ts_type_imports.ts.out
index 3972d6a97..3972d6a97 100644
--- a/cli/tests/testdata/ts_type_imports.ts.out
+++ b/cli/tests/testdata/run/ts_type_imports.ts.out
diff --git a/cli/tests/testdata/ts_type_imports_foo.ts b/cli/tests/testdata/run/ts_type_imports_foo.ts
index db20773f6..db20773f6 100644
--- a/cli/tests/testdata/ts_type_imports_foo.ts
+++ b/cli/tests/testdata/run/ts_type_imports_foo.ts
diff --git a/cli/tests/testdata/ts_type_only_import.d.ts b/cli/tests/testdata/run/ts_type_only_import.d.ts
index d48e4b48a..d48e4b48a 100644
--- a/cli/tests/testdata/ts_type_only_import.d.ts
+++ b/cli/tests/testdata/run/ts_type_only_import.d.ts
diff --git a/cli/tests/testdata/ts_type_only_import.ts b/cli/tests/testdata/run/ts_type_only_import.ts
index 53e114373..53e114373 100644
--- a/cli/tests/testdata/ts_type_only_import.ts
+++ b/cli/tests/testdata/run/ts_type_only_import.ts
diff --git a/cli/tests/testdata/ts_type_only_import.ts.out b/cli/tests/testdata/run/ts_type_only_import.ts.out
index 42852cd26..42852cd26 100644
--- a/cli/tests/testdata/ts_type_only_import.ts.out
+++ b/cli/tests/testdata/run/ts_type_only_import.ts.out
diff --git a/cli/tests/testdata/run/tsx_imports/Component.tsx b/cli/tests/testdata/run/tsx_imports/Component.tsx
new file mode 100644
index 000000000..c466a28ca
--- /dev/null
+++ b/cli/tests/testdata/run/tsx_imports/Component.tsx
@@ -0,0 +1 @@
+import "../046_jsx_test.tsx";
diff --git a/cli/tests/testdata/tsx_imports.ts b/cli/tests/testdata/run/tsx_imports/tsx_imports.ts
index 44ba10b7a..44ba10b7a 100644
--- a/cli/tests/testdata/tsx_imports.ts
+++ b/cli/tests/testdata/run/tsx_imports/tsx_imports.ts
diff --git a/cli/tests/testdata/tsx_imports.ts.out b/cli/tests/testdata/run/tsx_imports/tsx_imports.ts.out
index 1f8b10d32..1f8b10d32 100644
--- a/cli/tests/testdata/tsx_imports.ts.out
+++ b/cli/tests/testdata/run/tsx_imports/tsx_imports.ts.out
diff --git a/cli/tests/testdata/run/type_definitions.ts b/cli/tests/testdata/run/type_definitions.ts
new file mode 100644
index 000000000..594842721
--- /dev/null
+++ b/cli/tests/testdata/run/type_definitions.ts
@@ -0,0 +1,12 @@
+// deno-lint-ignore-file
+
+// @deno-types="../type_definitions/foo.d.ts"
+import { foo } from "../type_definitions/foo.js";
+// @deno-types="../type_definitions/fizz.d.ts"
+import "../type_definitions/fizz.js";
+
+import * as qat from "../type_definitions/qat.ts";
+
+console.log(foo);
+console.log(fizz);
+console.log(qat.qat);
diff --git a/cli/tests/testdata/type_definitions.ts.out b/cli/tests/testdata/run/type_definitions.ts.out
index b4fa88c50..b4fa88c50 100644
--- a/cli/tests/testdata/type_definitions.ts.out
+++ b/cli/tests/testdata/run/type_definitions.ts.out
diff --git a/cli/tests/testdata/type_definitions_for_export.ts b/cli/tests/testdata/run/type_definitions_for_export.ts
index 1f17b4962..1f17b4962 100644
--- a/cli/tests/testdata/type_definitions_for_export.ts
+++ b/cli/tests/testdata/run/type_definitions_for_export.ts
diff --git a/cli/tests/testdata/type_definitions_for_export.ts.out b/cli/tests/testdata/run/type_definitions_for_export.ts.out
index 8f1240bc7..8f1240bc7 100644
--- a/cli/tests/testdata/type_definitions_for_export.ts.out
+++ b/cli/tests/testdata/run/type_definitions_for_export.ts.out
diff --git a/cli/tests/testdata/type_directives_01.ts b/cli/tests/testdata/run/type_directives_01.ts
index 71305824c..71305824c 100644
--- a/cli/tests/testdata/type_directives_01.ts
+++ b/cli/tests/testdata/run/type_directives_01.ts
diff --git a/cli/tests/testdata/type_directives_01.ts.out b/cli/tests/testdata/run/type_directives_01.ts.out
index 77ed3ae26..77ed3ae26 100644
--- a/cli/tests/testdata/type_directives_01.ts.out
+++ b/cli/tests/testdata/run/type_directives_01.ts.out
diff --git a/cli/tests/testdata/run/type_directives_02.ts b/cli/tests/testdata/run/type_directives_02.ts
new file mode 100644
index 000000000..0c59346e2
--- /dev/null
+++ b/cli/tests/testdata/run/type_directives_02.ts
@@ -0,0 +1,3 @@
+import * as foo from "../subdir/type_reference.js";
+
+console.log(foo.foo);
diff --git a/cli/tests/testdata/type_directives_02.ts.out b/cli/tests/testdata/run/type_directives_02.ts.out
index b064483b4..b064483b4 100644
--- a/cli/tests/testdata/type_directives_02.ts.out
+++ b/cli/tests/testdata/run/type_directives_02.ts.out
diff --git a/cli/tests/testdata/run/type_directives_js_main.js b/cli/tests/testdata/run/type_directives_js_main.js
new file mode 100644
index 000000000..0c59346e2
--- /dev/null
+++ b/cli/tests/testdata/run/type_directives_js_main.js
@@ -0,0 +1,3 @@
+import * as foo from "../subdir/type_reference.js";
+
+console.log(foo.foo);
diff --git a/cli/tests/testdata/type_directives_js_main.js.out b/cli/tests/testdata/run/type_directives_js_main.js.out
index 7bca837f0..7bca837f0 100644
--- a/cli/tests/testdata/type_directives_js_main.js.out
+++ b/cli/tests/testdata/run/type_directives_js_main.js.out
diff --git a/cli/tests/testdata/run/type_directives_redirect.ts b/cli/tests/testdata/run/type_directives_redirect.ts
new file mode 100644
index 000000000..8b98831fd
--- /dev/null
+++ b/cli/tests/testdata/run/type_directives_redirect.ts
@@ -0,0 +1 @@
+import "http://localhost:4545/run/type_directives_redirect.js";
diff --git a/cli/tests/testdata/type_directives_redirect.ts.out b/cli/tests/testdata/run/type_directives_redirect.ts.out
index 471d9c0b4..471d9c0b4 100644
--- a/cli/tests/testdata/type_directives_redirect.ts.out
+++ b/cli/tests/testdata/run/type_directives_redirect.ts.out
diff --git a/cli/tests/testdata/type_headers_deno_types.ts b/cli/tests/testdata/run/type_headers_deno_types.ts
index 92391c666..9670f68cd 100644
--- a/cli/tests/testdata/type_headers_deno_types.ts
+++ b/cli/tests/testdata/run/type_headers_deno_types.ts
@@ -12,7 +12,7 @@
* header.
*/
-// @deno-types="http://127.0.0.1:4545/type_headers_deno_types.foo.d.ts"
-import { foo } from "http://127.0.0.1:4545/type_headers_deno_types.foo.js";
+// @deno-types="http://127.0.0.1:4545/run/type_headers_deno_types.foo.d.ts"
+import { foo } from "http://127.0.0.1:4545/run/type_headers_deno_types.foo.js";
foo("hello");
diff --git a/cli/tests/testdata/run/type_headers_deno_types.ts.out b/cli/tests/testdata/run/type_headers_deno_types.ts.out
new file mode 100644
index 000000000..798f98311
--- /dev/null
+++ b/cli/tests/testdata/run/type_headers_deno_types.ts.out
@@ -0,0 +1,5 @@
+Download http://[WILDCARD]:4545/run/type_headers_deno_types.foo.js
+Download http://[WILDCARD]:4545/run/type_headers_deno_types.foo.d.ts
+Download http://[WILDCARD]:4545/run/type_headers_deno_types.d.ts
+Check [WILDCARD]/type_headers_deno_types.ts
+hello
diff --git a/cli/tests/testdata/unbuffered_stderr.ts b/cli/tests/testdata/run/unbuffered_stderr.ts
index 0f1d2a999..0f1d2a999 100644
--- a/cli/tests/testdata/unbuffered_stderr.ts
+++ b/cli/tests/testdata/run/unbuffered_stderr.ts
diff --git a/cli/tests/testdata/unbuffered_stderr.ts.out b/cli/tests/testdata/run/unbuffered_stderr.ts.out
index 500019738..500019738 100644
--- a/cli/tests/testdata/unbuffered_stderr.ts.out
+++ b/cli/tests/testdata/run/unbuffered_stderr.ts.out
diff --git a/cli/tests/testdata/unbuffered_stdout.ts b/cli/tests/testdata/run/unbuffered_stdout.ts
index 9f1e07a97..9f1e07a97 100644
--- a/cli/tests/testdata/unbuffered_stdout.ts
+++ b/cli/tests/testdata/run/unbuffered_stdout.ts
diff --git a/cli/tests/testdata/unbuffered_stdout.ts.out b/cli/tests/testdata/run/unbuffered_stdout.ts.out
index 2e65efe2a..2e65efe2a 100644
--- a/cli/tests/testdata/unbuffered_stdout.ts.out
+++ b/cli/tests/testdata/run/unbuffered_stdout.ts.out
diff --git a/cli/tests/testdata/unhandled_rejection.ts b/cli/tests/testdata/run/unhandled_rejection.ts
index 388583434..388583434 100644
--- a/cli/tests/testdata/unhandled_rejection.ts
+++ b/cli/tests/testdata/run/unhandled_rejection.ts
diff --git a/cli/tests/testdata/run/unhandled_rejection.ts.out b/cli/tests/testdata/run/unhandled_rejection.ts.out
new file mode 100644
index 000000000..6ab1667dc
--- /dev/null
+++ b/cli/tests/testdata/run/unhandled_rejection.ts.out
@@ -0,0 +1,9 @@
+[WILDCARD]
+unhandled rejection at: Promise {
+ <rejected> Error: bar not available
+ at new Foo (file:///[WILDCARD]/testdata/run/unhandled_rejection.ts:8:20)
+ at file:///[WILDCARD]/testdata/run/unhandled_rejection.ts:12:1
+} reason: Error: bar not available
+ at new Foo (file:///[WILDCARD]/testdata/run/unhandled_rejection.ts:8:20)
+ at file:///[WILDCARD]/testdata/run/unhandled_rejection.ts:12:1
+unhandled rejection at: Promise { <rejected> undefined } reason: undefined
diff --git a/cli/tests/testdata/unhandled_rejection_sync_error.ts b/cli/tests/testdata/run/unhandled_rejection_sync_error.ts
index 0dabb1cb7..0dabb1cb7 100644
--- a/cli/tests/testdata/unhandled_rejection_sync_error.ts
+++ b/cli/tests/testdata/run/unhandled_rejection_sync_error.ts
diff --git a/cli/tests/testdata/run/unhandled_rejection_sync_error.ts.out b/cli/tests/testdata/run/unhandled_rejection_sync_error.ts.out
new file mode 100644
index 000000000..e178373f0
--- /dev/null
+++ b/cli/tests/testdata/run/unhandled_rejection_sync_error.ts.out
@@ -0,0 +1,6 @@
+[WILDCARD]
+unhandled rejection at: Promise {
+ <rejected> Error: boom!
+ at file:///[WILDCARD]testdata/run/unhandled_rejection_sync_error.ts:6:7
+} reason: Error: boom!
+ at file:///[WILDCARD]testdata/run/unhandled_rejection_sync_error.ts:6:7
diff --git a/cli/tests/testdata/unstable.js b/cli/tests/testdata/run/unstable.js
index a9894be3e..a9894be3e 100644
--- a/cli/tests/testdata/unstable.js
+++ b/cli/tests/testdata/run/unstable.js
diff --git a/cli/tests/testdata/unstable.ts b/cli/tests/testdata/run/unstable.ts
index a9894be3e..a9894be3e 100644
--- a/cli/tests/testdata/unstable.ts
+++ b/cli/tests/testdata/run/unstable.ts
diff --git a/cli/tests/testdata/unstable_disabled.out b/cli/tests/testdata/run/unstable_disabled.out
index 28659645d..28659645d 100644
--- a/cli/tests/testdata/unstable_disabled.out
+++ b/cli/tests/testdata/run/unstable_disabled.out
diff --git a/cli/tests/testdata/unstable_disabled_js.out b/cli/tests/testdata/run/unstable_disabled_js.out
index 417b7b537..417b7b537 100644
--- a/cli/tests/testdata/unstable_disabled_js.out
+++ b/cli/tests/testdata/run/unstable_disabled_js.out
diff --git a/cli/tests/testdata/unstable_enabled.out b/cli/tests/testdata/run/unstable_enabled.out
index b4cedce14..b4cedce14 100644
--- a/cli/tests/testdata/unstable_enabled.out
+++ b/cli/tests/testdata/run/unstable_enabled.out
diff --git a/cli/tests/testdata/unstable_enabled_js.out b/cli/tests/testdata/run/unstable_enabled_js.out
index b4cedce14..b4cedce14 100644
--- a/cli/tests/testdata/unstable_enabled_js.out
+++ b/cli/tests/testdata/run/unstable_enabled_js.out
diff --git a/cli/tests/testdata/unstable_worker.ts b/cli/tests/testdata/run/unstable_worker.ts
index f96de6c4a..d111d2c7e 100644
--- a/cli/tests/testdata/unstable_worker.ts
+++ b/cli/tests/testdata/run/unstable_worker.ts
@@ -1,5 +1,5 @@
const w = new Worker(
- import.meta.resolve("./workers/worker_unstable.ts"),
+ import.meta.resolve("../workers/worker_unstable.ts"),
{ type: "module", name: "Unstable Worker" },
);
diff --git a/cli/tests/testdata/unstable_worker.ts.out b/cli/tests/testdata/run/unstable_worker.ts.out
index b40bdfeb8..b40bdfeb8 100644
--- a/cli/tests/testdata/unstable_worker.ts.out
+++ b/cli/tests/testdata/run/unstable_worker.ts.out
diff --git a/cli/tests/testdata/unsupported_dynamic_import_scheme.out b/cli/tests/testdata/run/unsupported_dynamic_import_scheme.out
index c708fced4..c708fced4 100644
--- a/cli/tests/testdata/unsupported_dynamic_import_scheme.out
+++ b/cli/tests/testdata/run/unsupported_dynamic_import_scheme.out
diff --git a/cli/tests/testdata/v8_flags.js b/cli/tests/testdata/run/v8_flags.js
index f7999c4af..f7999c4af 100644
--- a/cli/tests/testdata/v8_flags.js
+++ b/cli/tests/testdata/run/v8_flags.js
diff --git a/cli/tests/testdata/v8_flags.js.out b/cli/tests/testdata/run/v8_flags.js.out
index e2dbde096..e2dbde096 100644
--- a/cli/tests/testdata/v8_flags.js.out
+++ b/cli/tests/testdata/run/v8_flags.js.out
diff --git a/cli/tests/testdata/v8_flags_unrecognized.out b/cli/tests/testdata/run/v8_flags_unrecognized.out
index 56e70f830..56e70f830 100644
--- a/cli/tests/testdata/v8_flags_unrecognized.out
+++ b/cli/tests/testdata/run/v8_flags_unrecognized.out
diff --git a/cli/tests/testdata/v8_help.out b/cli/tests/testdata/run/v8_help.out
index 006d73557..006d73557 100644
--- a/cli/tests/testdata/v8_help.out
+++ b/cli/tests/testdata/run/v8_help.out
diff --git a/cli/tests/testdata/wasm.ts b/cli/tests/testdata/run/wasm.ts
index 96b5fdffc..96b5fdffc 100644
--- a/cli/tests/testdata/wasm.ts
+++ b/cli/tests/testdata/run/wasm.ts
diff --git a/cli/tests/testdata/wasm.ts.out b/cli/tests/testdata/run/wasm.ts.out
index d81cc0710..d81cc0710 100644
--- a/cli/tests/testdata/wasm.ts.out
+++ b/cli/tests/testdata/run/wasm.ts.out
diff --git a/cli/tests/testdata/wasm_async.js b/cli/tests/testdata/run/wasm_async.js
index 837460ae9..837460ae9 100644
--- a/cli/tests/testdata/wasm_async.js
+++ b/cli/tests/testdata/run/wasm_async.js
diff --git a/cli/tests/testdata/wasm_async.out b/cli/tests/testdata/run/wasm_async.out
index 5cdf17de7..5cdf17de7 100644
--- a/cli/tests/testdata/wasm_async.out
+++ b/cli/tests/testdata/run/wasm_async.out
diff --git a/cli/tests/testdata/wasm_shared.out b/cli/tests/testdata/run/wasm_shared.out
index e69de29bb..e69de29bb 100644
--- a/cli/tests/testdata/wasm_shared.out
+++ b/cli/tests/testdata/run/wasm_shared.out
diff --git a/cli/tests/testdata/wasm_shared.ts b/cli/tests/testdata/run/wasm_shared.ts
index b713385d5..b713385d5 100644
--- a/cli/tests/testdata/wasm_shared.ts
+++ b/cli/tests/testdata/run/wasm_shared.ts
diff --git a/cli/tests/testdata/wasm_streaming_panic_test.js b/cli/tests/testdata/run/wasm_streaming_panic_test.js
index ec017592f..ec017592f 100644
--- a/cli/tests/testdata/wasm_streaming_panic_test.js
+++ b/cli/tests/testdata/run/wasm_streaming_panic_test.js
diff --git a/cli/tests/testdata/wasm_streaming_panic_test.js.out b/cli/tests/testdata/run/wasm_streaming_panic_test.js.out
index 3e93f643a..3e93f643a 100644
--- a/cli/tests/testdata/wasm_streaming_panic_test.js.out
+++ b/cli/tests/testdata/run/wasm_streaming_panic_test.js.out
diff --git a/cli/tests/testdata/wasm_unreachable.js b/cli/tests/testdata/run/wasm_unreachable.js
index 36aab0d84..d6a4f59db 100644
--- a/cli/tests/testdata/wasm_unreachable.js
+++ b/cli/tests/testdata/run/wasm_unreachable.js
@@ -1,5 +1,5 @@
// WebAssembly module containing a single function with an unreachable instruction
-const binary = await Deno.readFile("./unreachable.wasm");
+const binary = await Deno.readFile("./assets/unreachable.wasm");
const module = new WebAssembly.Module(binary);
const instance = new WebAssembly.Instance(module);
diff --git a/cli/tests/testdata/wasm_unreachable.out b/cli/tests/testdata/run/wasm_unreachable.out
index c213097ab..c213097ab 100644
--- a/cli/tests/testdata/wasm_unreachable.out
+++ b/cli/tests/testdata/run/wasm_unreachable.out
diff --git a/cli/tests/testdata/wasm_url.js b/cli/tests/testdata/run/wasm_url.js
index bb7ccd73d..71686ef7e 100644
--- a/cli/tests/testdata/wasm_url.js
+++ b/cli/tests/testdata/run/wasm_url.js
@@ -1,5 +1,5 @@
const module = await WebAssembly.compileStreaming(
- fetch("http://localhost:4545/unreachable.wasm"),
+ fetch("http://localhost:4545/assets/unreachable.wasm"),
);
const instance = new WebAssembly.Instance(module);
diff --git a/cli/tests/testdata/wasm_url.out b/cli/tests/testdata/run/wasm_url.out
index c88b51020..ae3bf491a 100644
--- a/cli/tests/testdata/wasm_url.out
+++ b/cli/tests/testdata/run/wasm_url.out
@@ -1,3 +1,3 @@
error: Uncaught (in promise) RuntimeError: unreachable
- at <anonymous> (http://localhost:4545/unreachable.wasm:1:41)
+ at <anonymous> (http://localhost:4545/assets/unreachable.wasm:1:41)
at [WILDCARD]/wasm_url.js:[WILDCARD]
diff --git a/cli/tests/testdata/weakref.ts b/cli/tests/testdata/run/weakref.ts
index 47c3985fe..47c3985fe 100644
--- a/cli/tests/testdata/weakref.ts
+++ b/cli/tests/testdata/run/weakref.ts
diff --git a/cli/tests/testdata/weakref.ts.out b/cli/tests/testdata/run/weakref.ts.out
index 32bafcf2d..32bafcf2d 100644
--- a/cli/tests/testdata/weakref.ts.out
+++ b/cli/tests/testdata/run/weakref.ts.out
diff --git a/cli/tests/testdata/websocket_server_idletimeout.ts b/cli/tests/testdata/run/websocket_server_idletimeout.ts
index 9ae6698cb..9ae6698cb 100644
--- a/cli/tests/testdata/websocket_server_idletimeout.ts
+++ b/cli/tests/testdata/run/websocket_server_idletimeout.ts
diff --git a/cli/tests/testdata/websocket_server_multi_field_connection_header_test.ts b/cli/tests/testdata/run/websocket_server_multi_field_connection_header_test.ts
index a662ce9ef..709419a6a 100644
--- a/cli/tests/testdata/websocket_server_multi_field_connection_header_test.ts
+++ b/cli/tests/testdata/run/websocket_server_multi_field_connection_header_test.ts
@@ -1,4 +1,4 @@
-import { deferred } from "../unit/test_util.ts";
+import { deferred } from "../../unit/test_util.ts";
const promise = deferred();
const listener = Deno.listen({ port: 4319 });
diff --git a/cli/tests/testdata/websocket_test.ts b/cli/tests/testdata/run/websocket_test.ts
index 1572e0e67..e557a3cb2 100644
--- a/cli/tests/testdata/websocket_test.ts
+++ b/cli/tests/testdata/run/websocket_test.ts
@@ -4,8 +4,8 @@ import {
assertEquals,
assertThrows,
fail,
-} from "../../../test_util/std/testing/asserts.ts";
-import { deferred } from "../../../test_util/std/async/deferred.ts";
+} from "../../../../test_util/std/testing/asserts.ts";
+import { deferred } from "../../../../test_util/std/async/deferred.ts";
Deno.test("invalid scheme", () => {
assertThrows(() => new WebSocket("foo://localhost:4242"));
diff --git a/cli/tests/testdata/websocketstream_ping_test.ts b/cli/tests/testdata/run/websocketstream_ping_test.ts
index 12f847cd8..12f847cd8 100644
--- a/cli/tests/testdata/websocketstream_ping_test.ts
+++ b/cli/tests/testdata/run/websocketstream_ping_test.ts
diff --git a/cli/tests/testdata/websocketstream_test.ts b/cli/tests/testdata/run/websocketstream_test.ts
index 71969314e..74d8e5d9a 100644
--- a/cli/tests/testdata/websocketstream_test.ts
+++ b/cli/tests/testdata/run/websocketstream_test.ts
@@ -7,7 +7,7 @@ import {
assertRejects,
assertThrows,
unreachable,
-} from "../../../test_util/std/testing/asserts.ts";
+} from "../../../../test_util/std/testing/asserts.ts";
Deno.test("fragment", () => {
assertThrows(() => new WebSocketStream("ws://localhost:4242/#"));
diff --git a/cli/tests/testdata/webstorage/config_a.jsonc b/cli/tests/testdata/run/webstorage/config_a.jsonc
index 875cb6001..875cb6001 100644
--- a/cli/tests/testdata/webstorage/config_a.jsonc
+++ b/cli/tests/testdata/run/webstorage/config_a.jsonc
diff --git a/cli/tests/testdata/webstorage/config_b.jsonc b/cli/tests/testdata/run/webstorage/config_b.jsonc
index 875cb6001..875cb6001 100644
--- a/cli/tests/testdata/webstorage/config_b.jsonc
+++ b/cli/tests/testdata/run/webstorage/config_b.jsonc
diff --git a/cli/tests/testdata/webstorage/fixture.ts b/cli/tests/testdata/run/webstorage/fixture.ts
index cf4bd9f1f..cf4bd9f1f 100644
--- a/cli/tests/testdata/webstorage/fixture.ts
+++ b/cli/tests/testdata/run/webstorage/fixture.ts
diff --git a/cli/tests/testdata/webstorage/logger.ts b/cli/tests/testdata/run/webstorage/logger.ts
index 3898c4445..3898c4445 100644
--- a/cli/tests/testdata/webstorage/logger.ts
+++ b/cli/tests/testdata/run/webstorage/logger.ts
diff --git a/cli/tests/testdata/webstorage/serialization.ts b/cli/tests/testdata/run/webstorage/serialization.ts
index f3791d355..f3791d355 100644
--- a/cli/tests/testdata/webstorage/serialization.ts
+++ b/cli/tests/testdata/run/webstorage/serialization.ts
diff --git a/cli/tests/testdata/webstorage/serialization.ts.out b/cli/tests/testdata/run/webstorage/serialization.ts.out
index fea76aa43..fea76aa43 100644
--- a/cli/tests/testdata/webstorage/serialization.ts.out
+++ b/cli/tests/testdata/run/webstorage/serialization.ts.out
diff --git a/cli/tests/testdata/webstorage/setter.ts b/cli/tests/testdata/run/webstorage/setter.ts
index ec6d474f5..ec6d474f5 100644
--- a/cli/tests/testdata/webstorage/setter.ts
+++ b/cli/tests/testdata/run/webstorage/setter.ts
diff --git a/cli/tests/testdata/worker_close_in_wasm_reactions.js b/cli/tests/testdata/run/worker_close_in_wasm_reactions.js
index ed57fa053..8238aaa14 100644
--- a/cli/tests/testdata/worker_close_in_wasm_reactions.js
+++ b/cli/tests/testdata/run/worker_close_in_wasm_reactions.js
@@ -5,6 +5,6 @@
// WASM async operation.
new Worker(
- import.meta.resolve("./workers/close_in_wasm_reactions.js"),
+ import.meta.resolve("../workers/close_in_wasm_reactions.js"),
{ type: "module" },
);
diff --git a/cli/tests/testdata/worker_close_in_wasm_reactions.js.out b/cli/tests/testdata/run/worker_close_in_wasm_reactions.js.out
index 6485c620e..6485c620e 100644
--- a/cli/tests/testdata/worker_close_in_wasm_reactions.js.out
+++ b/cli/tests/testdata/run/worker_close_in_wasm_reactions.js.out
diff --git a/cli/tests/testdata/worker_close_nested.js b/cli/tests/testdata/run/worker_close_nested.js
index 865022faa..b39dfd4c0 100644
--- a/cli/tests/testdata/worker_close_nested.js
+++ b/cli/tests/testdata/run/worker_close_nested.js
@@ -6,7 +6,7 @@
console.log("Starting the main thread");
const worker = new Worker(
- import.meta.resolve("./workers/close_nested_parent.js"),
+ import.meta.resolve("../workers/close_nested_parent.js"),
{ type: "module" },
);
diff --git a/cli/tests/testdata/worker_close_nested.js.out b/cli/tests/testdata/run/worker_close_nested.js.out
index 496bc6251..496bc6251 100644
--- a/cli/tests/testdata/worker_close_nested.js.out
+++ b/cli/tests/testdata/run/worker_close_nested.js.out
diff --git a/cli/tests/testdata/worker_close_race.js b/cli/tests/testdata/run/worker_close_race.js
index ff2b0eb8f..1b369c5d3 100644
--- a/cli/tests/testdata/worker_close_race.js
+++ b/cli/tests/testdata/run/worker_close_race.js
@@ -5,7 +5,7 @@
// `Worker.prototype.terminate()`.
const worker = new Worker(
- import.meta.resolve("./workers/close_race_worker.js"),
+ import.meta.resolve("../workers/close_race_worker.js"),
{ type: "module" },
);
diff --git a/cli/tests/testdata/worker_close_race.js.out b/cli/tests/testdata/run/worker_close_race.js.out
index e69de29bb..e69de29bb 100644
--- a/cli/tests/testdata/worker_close_race.js.out
+++ b/cli/tests/testdata/run/worker_close_race.js.out
diff --git a/cli/tests/testdata/worker_drop_handle_race.js b/cli/tests/testdata/run/worker_drop_handle_race.js
index 78f2d6cab..5ad918314 100644
--- a/cli/tests/testdata/worker_drop_handle_race.js
+++ b/cli/tests/testdata/run/worker_drop_handle_race.js
@@ -7,6 +7,6 @@
// The exception thrown in the worker will not terminate the worker, but it will
// propagate to the main thread and cause it to exit.
new Worker(
- import.meta.resolve("./workers/drop_handle_race.js"),
+ import.meta.resolve("../workers/drop_handle_race.js"),
{ type: "module" },
);
diff --git a/cli/tests/testdata/worker_drop_handle_race.js.out b/cli/tests/testdata/run/worker_drop_handle_race.js.out
index a81684bfa..a81684bfa 100644
--- a/cli/tests/testdata/worker_drop_handle_race.js.out
+++ b/cli/tests/testdata/run/worker_drop_handle_race.js.out
diff --git a/cli/tests/testdata/worker_drop_handle_race_terminate.js b/cli/tests/testdata/run/worker_drop_handle_race_terminate.js
index 93c324fdf..93c324fdf 100644
--- a/cli/tests/testdata/worker_drop_handle_race_terminate.js
+++ b/cli/tests/testdata/run/worker_drop_handle_race_terminate.js
diff --git a/cli/tests/testdata/worker_drop_handle_race_terminate.js.out b/cli/tests/testdata/run/worker_drop_handle_race_terminate.js.out
index 5ec1e7ff8..5ec1e7ff8 100644
--- a/cli/tests/testdata/worker_drop_handle_race_terminate.js.out
+++ b/cli/tests/testdata/run/worker_drop_handle_race_terminate.js.out
diff --git a/cli/tests/testdata/worker_event_handler_test.js b/cli/tests/testdata/run/worker_event_handler_test.js
index c4e816a4d..a91b0ec0b 100644
--- a/cli/tests/testdata/worker_event_handler_test.js
+++ b/cli/tests/testdata/run/worker_event_handler_test.js
@@ -1,5 +1,5 @@
const w = new Worker(
- import.meta.resolve("./workers/worker_event_handlers.js"),
+ import.meta.resolve("../workers/worker_event_handlers.js"),
{ type: "module" },
);
w.postMessage({});
diff --git a/cli/tests/testdata/worker_event_handler_test.js.out b/cli/tests/testdata/run/worker_event_handler_test.js.out
index b3eed7f6c..b3eed7f6c 100644
--- a/cli/tests/testdata/worker_event_handler_test.js.out
+++ b/cli/tests/testdata/run/worker_event_handler_test.js.out
diff --git a/cli/tests/testdata/worker_message_before_close.js b/cli/tests/testdata/run/worker_message_before_close.js
index a5769af60..569388b9b 100644
--- a/cli/tests/testdata/worker_message_before_close.js
+++ b/cli/tests/testdata/run/worker_message_before_close.js
@@ -2,7 +2,7 @@ const messagesReceived = new Set();
for (let i = 0; i < 4; i++) {
const worker = new Worker(
- import.meta.resolve("./workers/message_before_close.js"),
+ import.meta.resolve("../workers/message_before_close.js"),
{ type: "module", name: String(i) },
);
diff --git a/cli/tests/testdata/worker_message_before_close.js.out b/cli/tests/testdata/run/worker_message_before_close.js.out
index f91b7b4cb..f91b7b4cb 100644
--- a/cli/tests/testdata/worker_message_before_close.js.out
+++ b/cli/tests/testdata/run/worker_message_before_close.js.out
diff --git a/cli/tests/testdata/esm_imports_a.js b/cli/tests/testdata/runtime/esm_imports_a.js
index 673cd9aa3..673cd9aa3 100644
--- a/cli/tests/testdata/esm_imports_a.js
+++ b/cli/tests/testdata/runtime/esm_imports_a.js
diff --git a/cli/tests/testdata/esm_imports_b.js b/cli/tests/testdata/runtime/esm_imports_b.js
index 840121368..840121368 100644
--- a/cli/tests/testdata/esm_imports_b.js
+++ b/cli/tests/testdata/runtime/esm_imports_b.js
diff --git a/cli/tests/testdata/standalone_dynamic_imports.ts b/cli/tests/testdata/standalone_dynamic_imports.ts
deleted file mode 100644
index d4dc55152..000000000
--- a/cli/tests/testdata/standalone_dynamic_imports.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-(async () => {
- const { returnsHi, returnsFoo2, printHello3 } = await import(
- "./subdir/mod1.ts"
- );
-
- printHello3();
-
- if (returnsHi() !== "Hi") {
- throw Error("Unexpected");
- }
-
- if (returnsFoo2() !== "Foo") {
- throw Error("Unexpected");
- }
-})();
diff --git a/cli/tests/testdata/standalone_import.ts b/cli/tests/testdata/standalone_import.ts
deleted file mode 100644
index 804102a53..000000000
--- a/cli/tests/testdata/standalone_import.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-console.log("start");
-await import("./001_hello.js");
diff --git a/cli/tests/testdata/standalone_import_map.json b/cli/tests/testdata/standalone_import_map.json
deleted file mode 100644
index 6f978d6be..000000000
--- a/cli/tests/testdata/standalone_import_map.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "imports": {
- "hello": "./001_hello.js"
- }
-}
diff --git a/cli/tests/testdata/std_lint.out b/cli/tests/testdata/std_lint.out
deleted file mode 100644
index 9d62fcc67..000000000
--- a/cli/tests/testdata/std_lint.out
+++ /dev/null
@@ -1,3 +0,0 @@
-[WILDCARD]
-
-Found [WILDCARD] problems \ No newline at end of file
diff --git a/cli/tests/testdata/test/resource_sanitizer.ts b/cli/tests/testdata/test/resource_sanitizer.ts
index c1291b89a..93c9222c5 100644
--- a/cli/tests/testdata/test/resource_sanitizer.ts
+++ b/cli/tests/testdata/test/resource_sanitizer.ts
@@ -1,4 +1,4 @@
Deno.test("leak", function () {
- Deno.openSync("001_hello.js");
+ Deno.openSync("run/001_hello.js");
Deno.stdin.close();
});
diff --git a/cli/tests/testdata/ts_import_from_js.js b/cli/tests/testdata/ts_import_from_js.js
deleted file mode 100644
index f912c2723..000000000
--- a/cli/tests/testdata/ts_import_from_js.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import { printHello } from "./ts_import_from_js.deps.js";
-printHello();
-console.log("success");
diff --git a/cli/tests/testdata/ts_with_generic.ts b/cli/tests/testdata/ts_with_generic.ts
deleted file mode 100644
index 1e3591f40..000000000
--- a/cli/tests/testdata/ts_with_generic.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// deno-lint-ignore-file
-
-const foo = { delete<S>() {} };
diff --git a/cli/tests/testdata/type_definitions.ts b/cli/tests/testdata/type_definitions.ts
deleted file mode 100644
index a1bb37a65..000000000
--- a/cli/tests/testdata/type_definitions.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-// deno-lint-ignore-file
-
-// @deno-types="./type_definitions/foo.d.ts"
-import { foo } from "./type_definitions/foo.js";
-// @deno-types="./type_definitions/fizz.d.ts"
-import "./type_definitions/fizz.js";
-
-import * as qat from "./type_definitions/qat.ts";
-
-console.log(foo);
-console.log(fizz);
-console.log(qat.qat);
diff --git a/cli/tests/testdata/type_directives_02.ts b/cli/tests/testdata/type_directives_02.ts
deleted file mode 100644
index f7274bf26..000000000
--- a/cli/tests/testdata/type_directives_02.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import * as foo from "./subdir/type_reference.js";
-
-console.log(foo.foo);
diff --git a/cli/tests/testdata/type_directives_js_main.js b/cli/tests/testdata/type_directives_js_main.js
deleted file mode 100644
index f7274bf26..000000000
--- a/cli/tests/testdata/type_directives_js_main.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import * as foo from "./subdir/type_reference.js";
-
-console.log(foo.foo);
diff --git a/cli/tests/testdata/type_directives_redirect.ts b/cli/tests/testdata/type_directives_redirect.ts
deleted file mode 100644
index 1756d5af9..000000000
--- a/cli/tests/testdata/type_directives_redirect.ts
+++ /dev/null
@@ -1 +0,0 @@
-import "http://localhost:4545/type_directives_redirect.js";
diff --git a/cli/tests/testdata/type_headers_deno_types.ts.out b/cli/tests/testdata/type_headers_deno_types.ts.out
deleted file mode 100644
index f1e4ca1f8..000000000
--- a/cli/tests/testdata/type_headers_deno_types.ts.out
+++ /dev/null
@@ -1,5 +0,0 @@
-Download http://[WILDCARD]:4545/type_headers_deno_types.foo.js
-Download http://[WILDCARD]:4545/type_headers_deno_types.foo.d.ts
-Download http://[WILDCARD]:4545/type_headers_deno_types.d.ts
-Check [WILDCARD]/type_headers_deno_types.ts
-hello
diff --git a/cli/tests/testdata/types.out b/cli/tests/testdata/types/types.out
index 089a9381f..089a9381f 100644
--- a/cli/tests/testdata/types.out
+++ b/cli/tests/testdata/types/types.out
diff --git a/cli/tests/testdata/unhandled_rejection.ts.out b/cli/tests/testdata/unhandled_rejection.ts.out
deleted file mode 100644
index 6addab20a..000000000
--- a/cli/tests/testdata/unhandled_rejection.ts.out
+++ /dev/null
@@ -1,9 +0,0 @@
-[WILDCARD]
-unhandled rejection at: Promise {
- <rejected> Error: bar not available
- at new Foo (file:///[WILDCARD]/testdata/unhandled_rejection.ts:8:20)
- at file:///[WILDCARD]/testdata/unhandled_rejection.ts:12:1
-} reason: Error: bar not available
- at new Foo (file:///[WILDCARD]/testdata/unhandled_rejection.ts:8:20)
- at file:///[WILDCARD]/testdata/unhandled_rejection.ts:12:1
-unhandled rejection at: Promise { <rejected> undefined } reason: undefined
diff --git a/cli/tests/testdata/unhandled_rejection_sync_error.ts.out b/cli/tests/testdata/unhandled_rejection_sync_error.ts.out
deleted file mode 100644
index 270319824..000000000
--- a/cli/tests/testdata/unhandled_rejection_sync_error.ts.out
+++ /dev/null
@@ -1,6 +0,0 @@
-[WILDCARD]
-unhandled rejection at: Promise {
- <rejected> Error: boom!
- at file:///[WILDCARD]testdata/unhandled_rejection_sync_error.ts:6:7
-} reason: Error: boom!
- at file:///[WILDCARD]testdata/unhandled_rejection_sync_error.ts:6:7
diff --git a/cli/tests/testdata/webgpu_computepass_shader.wgsl b/cli/tests/testdata/webgpu/computepass_shader.wgsl
index 41af4363a..41af4363a 100644
--- a/cli/tests/testdata/webgpu_computepass_shader.wgsl
+++ b/cli/tests/testdata/webgpu/computepass_shader.wgsl
diff --git a/cli/tests/testdata/webgpu_hellotriangle.out b/cli/tests/testdata/webgpu/hellotriangle.out
index 91454dbfc..91454dbfc 100644
--- a/cli/tests/testdata/webgpu_hellotriangle.out
+++ b/cli/tests/testdata/webgpu/hellotriangle.out
Binary files differ
diff --git a/cli/tests/testdata/webgpu_hellotriangle_shader.wgsl b/cli/tests/testdata/webgpu/hellotriangle_shader.wgsl
index f84ccfe94..f84ccfe94 100644
--- a/cli/tests/testdata/webgpu_hellotriangle_shader.wgsl
+++ b/cli/tests/testdata/webgpu/hellotriangle_shader.wgsl
diff --git a/cli/tests/testdata/084_worker_custom_inspect.ts.out b/cli/tests/testdata/workers/custom_inspect/main.out
index b34300c40..b34300c40 100644
--- a/cli/tests/testdata/084_worker_custom_inspect.ts.out
+++ b/cli/tests/testdata/workers/custom_inspect/main.out
diff --git a/cli/tests/testdata/workers/custom_inspect/main.ts b/cli/tests/testdata/workers/custom_inspect/main.ts
new file mode 100644
index 000000000..93d4eec2d
--- /dev/null
+++ b/cli/tests/testdata/workers/custom_inspect/main.ts
@@ -0,0 +1,4 @@
+new Worker(
+ import.meta.resolve("./worker.ts"),
+ { type: "module" },
+);
diff --git a/cli/tests/testdata/084_worker_custom_inspect_worker.ts b/cli/tests/testdata/workers/custom_inspect/worker.ts
index 5be82724e..5be82724e 100644
--- a/cli/tests/testdata/084_worker_custom_inspect_worker.ts
+++ b/cli/tests/testdata/workers/custom_inspect/worker.ts
diff --git a/cli/tests/testdata/workers/error_worker_permissions_local.ts b/cli/tests/testdata/workers/error_worker_permissions_local.ts
new file mode 100644
index 000000000..1a4b4c0a9
--- /dev/null
+++ b/cli/tests/testdata/workers/error_worker_permissions_local.ts
@@ -0,0 +1,4 @@
+new Worker(
+ import.meta.resolve("../subdir/worker_types.ts"),
+ { type: "module" },
+);
diff --git a/cli/tests/testdata/error_worker_permissions_local.ts.out b/cli/tests/testdata/workers/error_worker_permissions_local.ts.out
index e6404e8e3..e6404e8e3 100644
--- a/cli/tests/testdata/error_worker_permissions_local.ts.out
+++ b/cli/tests/testdata/workers/error_worker_permissions_local.ts.out
diff --git a/cli/tests/testdata/error_worker_permissions_remote.ts b/cli/tests/testdata/workers/error_worker_permissions_remote.ts
index 878c7080a..878c7080a 100644
--- a/cli/tests/testdata/error_worker_permissions_remote.ts
+++ b/cli/tests/testdata/workers/error_worker_permissions_remote.ts
diff --git a/cli/tests/testdata/error_worker_permissions_remote.ts.out b/cli/tests/testdata/workers/error_worker_permissions_remote.ts.out
index 74c7c3974..74c7c3974 100644
--- a/cli/tests/testdata/error_worker_permissions_remote.ts.out
+++ b/cli/tests/testdata/workers/error_worker_permissions_remote.ts.out
diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts
index cbb2cd680..096ea5ab0 100644
--- a/cli/tests/unit/fetch_test.ts
+++ b/cli/tests/unit/fetch_test.ts
@@ -93,40 +93,40 @@ Deno.test(
);
Deno.test({ permissions: { net: true } }, async function fetchJsonSuccess() {
- const response = await fetch("http://localhost:4545/fixture.json");
+ const response = await fetch("http://localhost:4545/assets/fixture.json");
const json = await response.json();
assertEquals(json.name, "deno");
});
Deno.test({ permissions: { net: false } }, async function fetchPerm() {
await assertRejects(async () => {
- await fetch("http://localhost:4545/fixture.json");
+ await fetch("http://localhost:4545/assets/fixture.json");
}, Deno.errors.PermissionDenied);
});
Deno.test({ permissions: { net: true } }, async function fetchUrl() {
- const response = await fetch("http://localhost:4545/fixture.json");
- assertEquals(response.url, "http://localhost:4545/fixture.json");
+ const response = await fetch("http://localhost:4545/assets/fixture.json");
+ assertEquals(response.url, "http://localhost:4545/assets/fixture.json");
const _json = await response.json();
});
Deno.test({ permissions: { net: true } }, async function fetchURL() {
const response = await fetch(
- new URL("http://localhost:4545/fixture.json"),
+ new URL("http://localhost:4545/assets/fixture.json"),
);
- assertEquals(response.url, "http://localhost:4545/fixture.json");
+ assertEquals(response.url, "http://localhost:4545/assets/fixture.json");
const _json = await response.json();
});
Deno.test({ permissions: { net: true } }, async function fetchHeaders() {
- const response = await fetch("http://localhost:4545/fixture.json");
+ const response = await fetch("http://localhost:4545/assets/fixture.json");
const headers = response.headers;
assertEquals(headers.get("Content-Type"), "application/json");
const _json = await response.json();
});
Deno.test({ permissions: { net: true } }, async function fetchBlob() {
- const response = await fetch("http://localhost:4545/fixture.json");
+ const response = await fetch("http://localhost:4545/assets/fixture.json");
const headers = response.headers;
const blob = await response.blob();
assertEquals(blob.type, headers.get("Content-Type"));
@@ -137,7 +137,7 @@ Deno.test(
{ permissions: { net: true } },
async function fetchBodyUsedReader() {
const response = await fetch(
- "http://localhost:4545/fixture.json",
+ "http://localhost:4545/assets/fixture.json",
);
assert(response.body !== null);
@@ -155,7 +155,7 @@ Deno.test(
{ permissions: { net: true } },
async function fetchBodyUsedCancelStream() {
const response = await fetch(
- "http://localhost:4545/fixture.json",
+ "http://localhost:4545/assets/fixture.json",
);
assert(response.body !== null);
@@ -167,7 +167,7 @@ Deno.test(
);
Deno.test({ permissions: { net: true } }, async function fetchAsyncIterator() {
- const response = await fetch("http://localhost:4545/fixture.json");
+ const response = await fetch("http://localhost:4545/assets/fixture.json");
const headers = response.headers;
assert(response.body !== null);
@@ -181,7 +181,7 @@ Deno.test({ permissions: { net: true } }, async function fetchAsyncIterator() {
});
Deno.test({ permissions: { net: true } }, async function fetchBodyReader() {
- const response = await fetch("http://localhost:4545/fixture.json");
+ const response = await fetch("http://localhost:4545/assets/fixture.json");
const headers = response.headers;
assert(response.body !== null);
const reader = response.body.getReader();
@@ -220,7 +220,7 @@ Deno.test(
);
Deno.test({ permissions: { net: true } }, async function responseClone() {
- const response = await fetch("http://localhost:4545/fixture.json");
+ const response = await fetch("http://localhost:4545/assets/fixture.json");
const response1 = response.clone();
assert(response !== response1);
assertEquals(response.status, response1.status);
@@ -359,10 +359,10 @@ Deno.test(
permissions: { net: true },
},
async function fetchWithRedirection() {
- const response = await fetch("http://localhost:4546/hello.txt");
+ const response = await fetch("http://localhost:4546/assets/hello.txt");
assertEquals(response.status, 200);
assertEquals(response.statusText, "OK");
- assertEquals(response.url, "http://localhost:4545/hello.txt");
+ assertEquals(response.url, "http://localhost:4545/assets/hello.txt");
const body = await response.text();
assert(body.includes("Hello world!"));
},
@@ -374,7 +374,7 @@ Deno.test(
},
async function fetchWithRelativeRedirection() {
const response = await fetch(
- "http://localhost:4545/001_hello.js",
+ "http://localhost:4545/run/001_hello.js",
);
assertEquals(response.status, 200);
assertEquals(response.statusText, "OK");
@@ -449,7 +449,7 @@ Deno.test(
{ permissions: { net: true } },
async function fetchSeparateInit() {
// related to: https://github.com/denoland/deno/issues/10396
- const req = new Request("http://localhost:4545/001_hello.js");
+ const req = new Request("http://localhost:4545/run/001_hello.js");
const init = {
method: "GET",
};
@@ -901,7 +901,7 @@ Deno.test(async function responseWithoutBody() {
});
Deno.test({ permissions: { net: true } }, async function fetchBodyReadTwice() {
- const response = await fetch("http://localhost:4545/fixture.json");
+ const response = await fetch("http://localhost:4545/assets/fixture.json");
// Read body
const _json = await response.json();
@@ -925,7 +925,7 @@ Deno.test(
{ permissions: { net: true } },
async function fetchBodyReaderAfterRead() {
const response = await fetch(
- "http://localhost:4545/fixture.json",
+ "http://localhost:4545/assets/fixture.json",
);
assert(response.body !== null);
const reader = await response.body.getReader();
@@ -1005,7 +1005,7 @@ Deno.test(
Deno.test(
{ permissions: { net: true } },
async function fetchResourceCloseAfterStreamCancel() {
- const res = await fetch("http://localhost:4545/fixture.json");
+ const res = await fetch("http://localhost:4545/assets/fixture.json");
assert(res.body !== null);
// After ReadableStream.cancel is called, resource handle must be closed
@@ -1113,7 +1113,7 @@ Deno.test(
> {
const caCert = Deno.readTextFileSync("cli/tests/testdata/tls/RootCA.pem");
const client = Deno.createHttpClient({ caCerts: [caCert] });
- const response = await fetch("https://localhost:5545/fixture.json", {
+ const response = await fetch("https://localhost:5545/assets/fixture.json", {
client,
});
const json = await response.json();
@@ -1286,7 +1286,7 @@ Deno.test(
"cli/tests/testdata/tls/localhost.key",
),
});
- await fetch("https://localhost:5552/fixture.json", {
+ await fetch("https://localhost:5552/assets/fixture.json", {
client,
});
}, Deno.errors.InvalidData);
@@ -1303,7 +1303,7 @@ Deno.test(
),
privateKey: "bad data",
});
- await fetch("https://localhost:5552/fixture.json", {
+ await fetch("https://localhost:5552/assets/fixture.json", {
client,
});
}, Deno.errors.InvalidData);
@@ -1320,7 +1320,7 @@ Deno.test(
),
privateKey: "",
});
- await fetch("https://localhost:5552/fixture.json", {
+ await fetch("https://localhost:5552/assets/fixture.json", {
client,
});
}, Deno.errors.InvalidData);
diff --git a/cli/tests/unit/files_test.ts b/cli/tests/unit/files_test.ts
index d15f1f538..bb095072c 100644
--- a/cli/tests/unit/files_test.ts
+++ b/cli/tests/unit/files_test.ts
@@ -17,7 +17,7 @@ Deno.test(function filesStdioFileDescriptors() {
});
Deno.test({ permissions: { read: true } }, async function filesCopyToStdout() {
- const filename = "cli/tests/testdata/fixture.json";
+ const filename = "cli/tests/testdata/assets/fixture.json";
const file = await Deno.open(filename);
assert(file.rid > 2);
const bytesWritten = await copy(file, Deno.stdout);
@@ -27,7 +27,7 @@ Deno.test({ permissions: { read: true } }, async function filesCopyToStdout() {
});
Deno.test({ permissions: { read: true } }, async function filesIter() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = await Deno.open(filename);
let totalSize = 0;
@@ -42,7 +42,7 @@ Deno.test({ permissions: { read: true } }, async function filesIter() {
Deno.test(
{ permissions: { read: true } },
async function filesIterCustomBufSize() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = await Deno.open(filename);
let totalSize = 0;
@@ -59,7 +59,7 @@ Deno.test(
);
Deno.test({ permissions: { read: true } }, function filesIterSync() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = Deno.openSync(filename);
let totalSize = 0;
@@ -74,7 +74,7 @@ Deno.test({ permissions: { read: true } }, function filesIterSync() {
Deno.test(
{ permissions: { read: true } },
function filesIterSyncCustomBufSize() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = Deno.openSync(filename);
let totalSize = 0;
@@ -264,7 +264,7 @@ Deno.test(
);
Deno.test(async function openOptions() {
- const filename = "cli/tests/testdata/fixture.json";
+ const filename = "cli/tests/testdata/assets/fixture.json";
await assertRejects(
async () => {
await Deno.open(filename, { write: false });
@@ -558,7 +558,7 @@ Deno.test(
);
Deno.test({ permissions: { read: true } }, async function seekStart() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = await Deno.open(filename);
const seekPosition = 6;
// Deliberately move 1 step forward
@@ -575,7 +575,7 @@ Deno.test({ permissions: { read: true } }, async function seekStart() {
});
Deno.test({ permissions: { read: true } }, function seekSyncStart() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = Deno.openSync(filename);
const seekPosition = 6;
// Deliberately move 1 step forward
@@ -592,7 +592,7 @@ Deno.test({ permissions: { read: true } }, function seekSyncStart() {
});
Deno.test({ permissions: { read: true } }, async function seekCurrent() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = await Deno.open(filename);
// Deliberately move 1 step forward
await file.read(new Uint8Array(1)); // "H"
@@ -609,7 +609,7 @@ Deno.test({ permissions: { read: true } }, async function seekCurrent() {
});
Deno.test({ permissions: { read: true } }, function seekSyncCurrent() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = Deno.openSync(filename);
// Deliberately move 1 step forward
file.readSync(new Uint8Array(1)); // "H"
@@ -626,7 +626,7 @@ Deno.test({ permissions: { read: true } }, function seekSyncCurrent() {
});
Deno.test({ permissions: { read: true } }, async function seekEnd() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = await Deno.open(filename);
const seekPosition = -6;
// seek from end of file that has 12 chars, 12 - 6 = 6
@@ -640,7 +640,7 @@ Deno.test({ permissions: { read: true } }, async function seekEnd() {
});
Deno.test({ permissions: { read: true } }, function seekSyncEnd() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = Deno.openSync(filename);
const seekPosition = -6;
// seek from end of file that has 12 chars, 12 - 6 = 6
@@ -654,7 +654,7 @@ Deno.test({ permissions: { read: true } }, function seekSyncEnd() {
});
Deno.test({ permissions: { read: true } }, async function seekMode() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = await Deno.open(filename);
await assertRejects(
async () => {
@@ -747,7 +747,7 @@ Deno.test(async function fileStatSuccess() {
});
Deno.test({ permissions: { read: true } }, async function readableStream() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = await Deno.open(filename);
assert(file.readable instanceof ReadableStream);
const chunks = [];
@@ -761,7 +761,7 @@ Deno.test({ permissions: { read: true } }, async function readableStream() {
Deno.test(
{ permissions: { read: true } },
async function readableStreamTextEncoderPipe() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = await Deno.open(filename);
const readable = file.readable.pipeThrough(new TextDecoderStream());
const chunks = [];
diff --git a/cli/tests/unit/flock_test.ts b/cli/tests/unit/flock_test.ts
index fbc061593..7ece1695c 100644
--- a/cli/tests/unit/flock_test.ts
+++ b/cli/tests/unit/flock_test.ts
@@ -108,7 +108,7 @@ async function checkFirstBlocksSecond(opts: {
}
function runFlockTestProcess(opts: { exclusive: boolean; sync: boolean }) {
- const path = "cli/tests/testdata/fixture.json";
+ const path = "cli/tests/testdata/assets/fixture.json";
const scriptText = `
const { rid } = Deno.openSync("${path}");
diff --git a/cli/tests/unit/net_test.ts b/cli/tests/unit/net_test.ts
index c7a081bf4..10fed0c47 100644
--- a/cli/tests/unit/net_test.ts
+++ b/cli/tests/unit/net_test.ts
@@ -778,7 +778,7 @@ Deno.test({ permissions: { net: true } }, async function whatwgStreams() {
Deno.test(
{ permissions: { read: true } },
async function readableStreamTextEncoderPipe() {
- const filename = "cli/tests/testdata/hello.txt";
+ const filename = "cli/tests/testdata/assets/hello.txt";
const file = await Deno.open(filename);
const readable = file.readable.pipeThrough(new TextDecoderStream());
const chunks = [];
diff --git a/cli/tests/unit/read_dir_test.ts b/cli/tests/unit/read_dir_test.ts
index fecddd6c4..1c81e860a 100644
--- a/cli/tests/unit/read_dir_test.ts
+++ b/cli/tests/unit/read_dir_test.ts
@@ -41,10 +41,10 @@ Deno.test({ permissions: { read: false } }, function readDirSyncPerm() {
Deno.test({ permissions: { read: true } }, function readDirSyncNotDir() {
assertThrows(
() => {
- Deno.readDirSync("cli/tests/testdata/fixture.json");
+ Deno.readDirSync("cli/tests/testdata/assets/fixture.json");
},
Error,
- `readdir 'cli/tests/testdata/fixture.json'`,
+ `readdir 'cli/tests/testdata/assets/fixture.json'`,
);
});
diff --git a/cli/tests/unit/read_file_test.ts b/cli/tests/unit/read_file_test.ts
index 07935b7fb..c18cdf059 100644
--- a/cli/tests/unit/read_file_test.ts
+++ b/cli/tests/unit/read_file_test.ts
@@ -9,7 +9,7 @@ import {
} from "./test_util.ts";
Deno.test({ permissions: { read: true } }, function readFileSyncSuccess() {
- const data = Deno.readFileSync("cli/tests/testdata/fixture.json");
+ const data = Deno.readFileSync("cli/tests/testdata/assets/fixture.json");
assert(data.byteLength > 0);
const decoder = new TextDecoder("utf-8");
const json = decoder.decode(data);
@@ -19,7 +19,7 @@ Deno.test({ permissions: { read: true } }, function readFileSyncSuccess() {
Deno.test({ permissions: { read: true } }, function readFileSyncUrl() {
const data = Deno.readFileSync(
- pathToAbsoluteFileUrl("cli/tests/testdata/fixture.json"),
+ pathToAbsoluteFileUrl("cli/tests/testdata/assets/fixture.json"),
);
assert(data.byteLength > 0);
const decoder = new TextDecoder("utf-8");
@@ -30,7 +30,7 @@ Deno.test({ permissions: { read: true } }, function readFileSyncUrl() {
Deno.test({ permissions: { read: false } }, function readFileSyncPerm() {
assertThrows(() => {
- Deno.readFileSync("cli/tests/testdata/fixture.json");
+ Deno.readFileSync("cli/tests/testdata/assets/fixture.json");
}, Deno.errors.PermissionDenied);
});
@@ -42,7 +42,7 @@ Deno.test({ permissions: { read: true } }, function readFileSyncNotFound() {
Deno.test({ permissions: { read: true } }, async function readFileUrl() {
const data = await Deno.readFile(
- pathToAbsoluteFileUrl("cli/tests/testdata/fixture.json"),
+ pathToAbsoluteFileUrl("cli/tests/testdata/assets/fixture.json"),
);
assert(data.byteLength > 0);
const decoder = new TextDecoder("utf-8");
@@ -52,7 +52,7 @@ Deno.test({ permissions: { read: true } }, async function readFileUrl() {
});
Deno.test({ permissions: { read: true } }, async function readFileSuccess() {
- const data = await Deno.readFile("cli/tests/testdata/fixture.json");
+ const data = await Deno.readFile("cli/tests/testdata/assets/fixture.json");
assert(data.byteLength > 0);
const decoder = new TextDecoder("utf-8");
const json = decoder.decode(data);
@@ -62,13 +62,13 @@ Deno.test({ permissions: { read: true } }, async function readFileSuccess() {
Deno.test({ permissions: { read: false } }, async function readFilePerm() {
await assertRejects(async () => {
- await Deno.readFile("cli/tests/testdata/fixture.json");
+ await Deno.readFile("cli/tests/testdata/assets/fixture.json");
}, Deno.errors.PermissionDenied);
});
Deno.test({ permissions: { read: true } }, function readFileSyncLoop() {
for (let i = 0; i < 256; i++) {
- Deno.readFileSync("cli/tests/testdata/fixture.json");
+ Deno.readFileSync("cli/tests/testdata/assets/fixture.json");
}
});
@@ -97,7 +97,7 @@ Deno.test(
queueMicrotask(() => ac.abort());
await assertRejects(
async () => {
- await Deno.readFile("cli/tests/testdata/fixture.json", {
+ await Deno.readFile("cli/tests/testdata/assets/fixture.json", {
signal: ac.signal,
});
},
@@ -117,7 +117,7 @@ Deno.test(
queueMicrotask(() => ac.abort(abortReason));
await assertRejects(
async () => {
- await Deno.readFile("cli/tests/testdata/fixture.json", {
+ await Deno.readFile("cli/tests/testdata/assets/fixture.json", {
signal: ac.signal,
});
},
@@ -134,7 +134,7 @@ Deno.test(
const ac = new AbortController();
queueMicrotask(() => ac.abort("Some string"));
try {
- await Deno.readFile("cli/tests/testdata/fixture.json", {
+ await Deno.readFile("cli/tests/testdata/assets/fixture.json", {
signal: ac.signal,
});
unreachable();
diff --git a/cli/tests/unit/read_text_file_test.ts b/cli/tests/unit/read_text_file_test.ts
index 48d246dad..119c650b6 100644
--- a/cli/tests/unit/read_text_file_test.ts
+++ b/cli/tests/unit/read_text_file_test.ts
@@ -8,7 +8,7 @@ import {
} from "./test_util.ts";
Deno.test({ permissions: { read: true } }, function readTextFileSyncSuccess() {
- const data = Deno.readTextFileSync("cli/tests/testdata/fixture.json");
+ const data = Deno.readTextFileSync("cli/tests/testdata/assets/fixture.json");
assert(data.length > 0);
const pkg = JSON.parse(data);
assertEquals(pkg.name, "deno");
@@ -16,7 +16,7 @@ Deno.test({ permissions: { read: true } }, function readTextFileSyncSuccess() {
Deno.test({ permissions: { read: true } }, function readTextFileSyncByUrl() {
const data = Deno.readTextFileSync(
- pathToAbsoluteFileUrl("cli/tests/testdata/fixture.json"),
+ pathToAbsoluteFileUrl("cli/tests/testdata/assets/fixture.json"),
);
assert(data.length > 0);
const pkg = JSON.parse(data);
@@ -25,7 +25,7 @@ Deno.test({ permissions: { read: true } }, function readTextFileSyncByUrl() {
Deno.test({ permissions: { read: false } }, function readTextFileSyncPerm() {
assertThrows(() => {
- Deno.readTextFileSync("cli/tests/testdata/fixture.json");
+ Deno.readTextFileSync("cli/tests/testdata/assets/fixture.json");
}, Deno.errors.PermissionDenied);
});
@@ -38,7 +38,9 @@ Deno.test({ permissions: { read: true } }, function readTextFileSyncNotFound() {
Deno.test(
{ permissions: { read: true } },
async function readTextFileSuccess() {
- const data = await Deno.readTextFile("cli/tests/testdata/fixture.json");
+ const data = await Deno.readTextFile(
+ "cli/tests/testdata/assets/fixture.json",
+ );
assert(data.length > 0);
const pkg = JSON.parse(data);
assertEquals(pkg.name, "deno");
@@ -47,7 +49,7 @@ Deno.test(
Deno.test({ permissions: { read: true } }, async function readTextFileByUrl() {
const data = await Deno.readTextFile(
- pathToAbsoluteFileUrl("cli/tests/testdata/fixture.json"),
+ pathToAbsoluteFileUrl("cli/tests/testdata/assets/fixture.json"),
);
assert(data.length > 0);
const pkg = JSON.parse(data);
@@ -56,13 +58,13 @@ Deno.test({ permissions: { read: true } }, async function readTextFileByUrl() {
Deno.test({ permissions: { read: false } }, async function readTextFilePerm() {
await assertRejects(async () => {
- await Deno.readTextFile("cli/tests/testdata/fixture.json");
+ await Deno.readTextFile("cli/tests/testdata/assets/fixture.json");
}, Deno.errors.PermissionDenied);
});
Deno.test({ permissions: { read: true } }, function readTextFileSyncLoop() {
for (let i = 0; i < 256; i++) {
- Deno.readTextFileSync("cli/tests/testdata/fixture.json");
+ Deno.readTextFileSync("cli/tests/testdata/assets/fixture.json");
}
});
@@ -91,7 +93,7 @@ Deno.test(
queueMicrotask(() => ac.abort());
await assertRejects(
async () => {
- await Deno.readFile("cli/tests/testdata/fixture.json", {
+ await Deno.readFile("cli/tests/testdata/assets/fixture.json", {
signal: ac.signal,
});
},
@@ -111,7 +113,7 @@ Deno.test(
queueMicrotask(() => ac.abort(abortReason));
await assertRejects(
async () => {
- await Deno.readFile("cli/tests/testdata/fixture.json", {
+ await Deno.readFile("cli/tests/testdata/assets/fixture.json", {
signal: ac.signal,
});
},
@@ -128,7 +130,7 @@ Deno.test(
const ac = new AbortController();
queueMicrotask(() => ac.abort("Some string"));
try {
- await Deno.readFile("cli/tests/testdata/fixture.json", {
+ await Deno.readFile("cli/tests/testdata/assets/fixture.json", {
signal: ac.signal,
});
unreachable();
diff --git a/cli/tests/unit/real_path_test.ts b/cli/tests/unit/real_path_test.ts
index 2dfb5d214..5297c2b76 100644
--- a/cli/tests/unit/real_path_test.ts
+++ b/cli/tests/unit/real_path_test.ts
@@ -9,7 +9,7 @@ import {
} from "./test_util.ts";
Deno.test({ permissions: { read: true } }, function realPathSyncSuccess() {
- const relative = "cli/tests/testdata/fixture.json";
+ const relative = "cli/tests/testdata/assets/fixture.json";
const realPath = Deno.realPathSync(relative);
if (Deno.build.os !== "windows") {
assert(realPath.startsWith("/"));
@@ -21,7 +21,7 @@ Deno.test({ permissions: { read: true } }, function realPathSyncSuccess() {
});
Deno.test({ permissions: { read: true } }, function realPathSyncUrl() {
- const relative = "cli/tests/testdata/fixture.json";
+ const relative = "cli/tests/testdata/assets/fixture.json";
const url = pathToAbsoluteFileUrl(relative);
assertEquals(Deno.realPathSync(relative), Deno.realPathSync(url));
});
@@ -60,7 +60,7 @@ Deno.test({ permissions: { read: true } }, function realPathSyncNotFound() {
});
Deno.test({ permissions: { read: true } }, async function realPathSuccess() {
- const relativePath = "cli/tests/testdata/fixture.json";
+ const relativePath = "cli/tests/testdata/assets/fixture.json";
const realPath = await Deno.realPath(relativePath);
if (Deno.build.os !== "windows") {
assert(realPath.startsWith("/"));
@@ -74,7 +74,7 @@ Deno.test({ permissions: { read: true } }, async function realPathSuccess() {
Deno.test(
{ permissions: { read: true } },
async function realPathUrl() {
- const relative = "cli/tests/testdata/fixture.json";
+ const relative = "cli/tests/testdata/assets/fixture.json";
const url = pathToAbsoluteFileUrl(relative);
assertEquals(await Deno.realPath(relative), await Deno.realPath(url));
},
diff --git a/cli/tests/unit/resources_test.ts b/cli/tests/unit/resources_test.ts
index 08fbfafc4..60325b91d 100644
--- a/cli/tests/unit/resources_test.ts
+++ b/cli/tests/unit/resources_test.ts
@@ -37,7 +37,7 @@ Deno.test({ permissions: { net: true } }, async function resourcesNet() {
Deno.test({ permissions: { read: true } }, async function resourcesFile() {
const resourcesBefore = Deno.resources();
- const f = await Deno.open("cli/tests/testdata/hello.txt");
+ const f = await Deno.open("cli/tests/testdata/assets/hello.txt");
const resourcesAfter = Deno.resources();
f.close();
diff --git a/cli/tests/unit/stat_test.ts b/cli/tests/unit/stat_test.ts
index f39b3be2c..9a504b4fc 100644
--- a/cli/tests/unit/stat_test.ts
+++ b/cli/tests/unit/stat_test.ts
@@ -146,7 +146,7 @@ Deno.test({ permissions: { read: true } }, function lstatSyncSuccess() {
Deno.test({ permissions: { read: false } }, function lstatSyncPerm() {
assertThrows(() => {
- Deno.lstatSync("hello.txt");
+ Deno.lstatSync("assets/hello.txt");
}, Deno.errors.PermissionDenied);
});
diff --git a/cli/tests/unit/tty_test.ts b/cli/tests/unit/tty_test.ts
index 9feacdf51..e50443aab 100644
--- a/cli/tests/unit/tty_test.ts
+++ b/cli/tests/unit/tty_test.ts
@@ -4,7 +4,7 @@ import { assert, assertThrows } from "./test_util.ts";
// Note tests for Deno.setRaw is in integration tests.
Deno.test({ permissions: { read: true } }, function consoleSizeFile() {
- const file = Deno.openSync("cli/tests/testdata/hello.txt");
+ const file = Deno.openSync("cli/tests/testdata/assets/hello.txt");
assertThrows(() => {
Deno.consoleSize(file.rid);
}, Error);
@@ -20,7 +20,7 @@ Deno.test(function consoleSizeError() {
Deno.test({ permissions: { read: true } }, function isatty() {
// CI not under TTY, so cannot test stdin/stdout/stderr.
- const f = Deno.openSync("cli/tests/testdata/hello.txt");
+ const f = Deno.openSync("cli/tests/testdata/assets/hello.txt");
assert(!Deno.isatty(f.rid));
f.close();
});
diff --git a/cli/tests/unit/wasm_test.ts b/cli/tests/unit/wasm_test.ts
index 2bf0a7480..03ed0e298 100644
--- a/cli/tests/unit/wasm_test.ts
+++ b/cli/tests/unit/wasm_test.ts
@@ -79,7 +79,7 @@ Deno.test(async function wasmInstantiateStreaming() {
Deno.test(
{ permissions: { read: true } },
async function wasmFileStreaming() {
- const url = import.meta.resolve("../testdata/unreachable.wasm");
+ const url = import.meta.resolve("../testdata/assets/unreachable.wasm");
assert(url.startsWith("file://"));
const { module } = await WebAssembly.instantiateStreaming(fetch(url));
@@ -96,7 +96,7 @@ Deno.test(
// deno-dom's WASM file is a real-world non-trivial case that gave us
// trouble when implementing this.
await WebAssembly.instantiateStreaming(fetch(
- "http://localhost:4545/deno_dom_0.1.3-alpha2.wasm",
+ "http://localhost:4545/assets/deno_dom_0.1.3-alpha2.wasm",
));
},
);
diff --git a/cli/tests/unit/webgpu_test.ts b/cli/tests/unit/webgpu_test.ts
index fa71ffcc8..c903736f8 100644
--- a/cli/tests/unit/webgpu_test.ts
+++ b/cli/tests/unit/webgpu_test.ts
@@ -27,7 +27,7 @@ Deno.test({
assert(device);
const shaderCode = await Deno.readTextFile(
- "cli/tests/testdata/webgpu_computepass_shader.wgsl",
+ "cli/tests/testdata/webgpu/computepass_shader.wgsl",
);
const shaderModule = device.createShaderModule({
@@ -116,7 +116,7 @@ Deno.test({
assert(device);
const shaderCode = await Deno.readTextFile(
- "cli/tests/testdata/webgpu_hellotriangle_shader.wgsl",
+ "cli/tests/testdata/webgpu/hellotriangle_shader.wgsl",
);
const shaderModule = device.createShaderModule({
@@ -202,7 +202,7 @@ Deno.test({
assertEquals(
data,
- await Deno.readFile("cli/tests/testdata/webgpu_hellotriangle.out"),
+ await Deno.readFile("cli/tests/testdata/webgpu/hellotriangle.out"),
);
outputBuffer.unmap();
diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs
index 584be9e6b..f2af48f26 100644
--- a/cli/tools/fmt.rs
+++ b/cli/tools/fmt.rs
@@ -757,8 +757,8 @@ mod test {
assert!(is_supported_ext_fmt(Path::new("readme.mdown")));
assert!(is_supported_ext_fmt(Path::new("readme.markdown")));
assert!(is_supported_ext_fmt(Path::new("lib/typescript.d.ts")));
- assert!(is_supported_ext_fmt(Path::new("testdata/001_hello.js")));
- assert!(is_supported_ext_fmt(Path::new("testdata/002_hello.ts")));
+ assert!(is_supported_ext_fmt(Path::new("testdata/run/001_hello.js")));
+ assert!(is_supported_ext_fmt(Path::new("testdata/run/002_hello.ts")));
assert!(is_supported_ext_fmt(Path::new("foo.jsx")));
assert!(is_supported_ext_fmt(Path::new("foo.tsx")));
assert!(is_supported_ext_fmt(Path::new("foo.TS")));
diff --git a/runtime/worker.rs b/runtime/worker.rs
index 82b6a589e..0723cef84 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -540,7 +540,7 @@ mod tests {
#[tokio::test]
async fn execute_mod_esm_imports_a() {
- let p = test_util::testdata_path().join("esm_imports_a.js");
+ let p = test_util::testdata_path().join("runtime/esm_imports_a.js");
let module_specifier = resolve_url_or_path(&p.to_string_lossy()).unwrap();
let mut worker = create_test_worker();
let result = worker.execute_main_module(&module_specifier).await;
@@ -583,7 +583,7 @@ mod tests {
// This assumes cwd is project root (an assumption made throughout the
// tests).
let mut worker = create_test_worker();
- let p = test_util::testdata_path().join("001_hello.js");
+ let p = test_util::testdata_path().join("run/001_hello.js");
let module_specifier = resolve_url_or_path(&p.to_string_lossy()).unwrap();
let result = worker.execute_main_module(&module_specifier).await;
assert!(result.is_ok());
diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs
index bf81e01a6..5a357ee7d 100644
--- a/test_util/src/lib.rs
+++ b/test_util/src/lib.rs
@@ -690,7 +690,7 @@ async fn main_server(
.insert("X-Deno-Warning", HeaderValue::from_static("foobar"));
res.headers_mut().insert(
"location",
- HeaderValue::from_bytes(b"/x_deno_warning_redirect.js").unwrap(),
+ HeaderValue::from_bytes(b"/lsp/x_deno_warning_redirect.js").unwrap(),
);
Ok(res)
}
@@ -774,7 +774,7 @@ async fn main_server(
);
Ok(res)
}
- (_, "/type_directives_redirect.js") => {
+ (_, "/run/type_directives_redirect.js") => {
let mut res = Response::new(Body::from("export const foo = 'foo';"));
res.headers_mut().insert(
"Content-type",
@@ -788,7 +788,7 @@ async fn main_server(
);
Ok(res)
}
- (_, "/type_headers_deno_types.foo.js") => {
+ (_, "/run/type_headers_deno_types.foo.js") => {
let mut res = Response::new(Body::from(
"export function foo(text) { console.log(text); }",
));
@@ -799,12 +799,12 @@ async fn main_server(
res.headers_mut().insert(
"X-TypeScript-Types",
HeaderValue::from_static(
- "http://localhost:4545/type_headers_deno_types.d.ts",
+ "http://localhost:4545/run/type_headers_deno_types.d.ts",
),
);
Ok(res)
}
- (_, "/type_headers_deno_types.d.ts") => {
+ (_, "/run/type_headers_deno_types.d.ts") => {
let mut res =
Response::new(Body::from("export function foo(text: number): void;"));
res.headers_mut().insert(
@@ -813,7 +813,7 @@ async fn main_server(
);
Ok(res)
}
- (_, "/type_headers_deno_types.foo.d.ts") => {
+ (_, "/run/type_headers_deno_types.foo.d.ts") => {
let mut res =
Response::new(Body::from("export function foo(text: string): void;"));
res.headers_mut().insert(
@@ -1458,7 +1458,7 @@ pub async fn run_all_servers() {
fn custom_headers(p: &str, body: Vec<u8>) -> Response<Body> {
let mut response = Response::new(Body::from(body));
- if p.ends_with("/053_import_compression/brotli") {
+ if p.ends_with("/run/import_compression/brotli") {
response
.headers_mut()
.insert("Content-Encoding", HeaderValue::from_static("br"));
@@ -1471,7 +1471,7 @@ fn custom_headers(p: &str, body: Vec<u8>) -> Response<Body> {
.insert("Content-Length", HeaderValue::from_static("26"));
return response;
}
- if p.ends_with("/053_import_compression/gziped") {
+ if p.ends_with("/run/import_compression/gziped") {
response
.headers_mut()
.insert("Content-Encoding", HeaderValue::from_static("gzip"));
diff --git a/tools/lint.js b/tools/lint.js
index 7012b8f22..65f8888b7 100755
--- a/tools/lint.js
+++ b/tools/lint.js
@@ -18,7 +18,6 @@ async function dlint() {
"*.ts",
":!:.github/mtime_cache/action.js",
":!:cli/tests/testdata/swc_syntax_error.ts",
- ":!:cli/tests/testdata/038_checkjs.js",
":!:cli/tests/testdata/error_008_checkjs.js",
":!:cli/bench/http/node*.js",
":!:cli/bench/testdata/npm/*",
@@ -31,6 +30,7 @@ async function dlint() {
":!:cli/tests/testdata/fmt/**",
":!:cli/tests/testdata/npm/**",
":!:cli/tests/testdata/lint/**",
+ ":!:cli/tests/testdata/run/**",
":!:cli/tests/testdata/tsc/**",
":!:cli/tsc/*typescript.js",
":!:cli/tsc/compiler.d.ts",