From acc32e1cee043ef7233a94bcf5645c4a842ed13a Mon Sep 17 00:00:00 2001 From: Mohammad Sulaiman Date: Mon, 16 Sep 2024 20:08:00 +0300 Subject: [PATCH] chore: move info itests (#25659) --- tests/integration/info_tests.rs | 124 ------------------ tests/integration/mod.rs | 2 - .../005_more_imports.ts | 11 ++ .../054_info_local_imports.out | 9 ++ .../_054_info_local_imports/__test__.jsonc | 5 + .../_054_info_local_imports/mod1.ts | 17 +++ .../_054_info_local_imports/mod2.ts | 1 + .../_054_info_local_imports/print_hello.ts | 3 + .../subdir2/dynamic_import.ts | 4 + .../_054_info_local_imports/subdir2/mod2.ts | 9 ++ .../info_tests/data_null_error/__test__.jsonc | 4 + .../data_null_error/data_null_error.out | 0 .../data_null_error}/data_null_error/mod.ts | 0 .../data_null_error/types.d.ts | 0 .../__test__.jsonc | 5 + .../dynamic_imports_tmp_lit/main.info.out | 10 ++ .../dynamic_imports_tmp_lit/main.js | 14 ++ .../dynamic_imports_tmp_lit/other/data.json | 3 + .../other/sub/data2.json | 3 + .../dynamic_imports_tmp_lit/sub/a.js | 1 + .../dynamic_imports_tmp_lit/sub/b.ts | 1 + .../info_tests/info_flag}/041_info_flag.out | 0 .../specs/info_tests/info_flag/__test__.jsonc | 4 + .../041_info_flag_location.out | 0 .../info_flag_location/__test__.jsonc | 4 + .../049_info_flag_script_jsx.out | 0 .../info_flag_script_jsx/__test__.jsonc | 4 + .../info_tests/info_import_map/__test__.jsonc | 5 + .../info_tests/info_import_map}/deno.json | 0 .../info_tests/info_import_map}/deno.lock | 0 .../info_tests/info_import_map}/main.tsx | 0 .../info_import_map}/with_import_map.out | 0 .../specs/info_tests/info_json/__test__.jsonc | 4 + .../info_tests/info_json}/info_json.out | 0 .../076_info_json_deps_order.out | 0 .../076_info_json_deps_order.ts | 0 .../info_json_deps_order/__test__.jsonc | 4 + .../recursive_imports/A.ts | 7 + .../recursive_imports/B.ts | 7 + .../recursive_imports/C.ts | 8 ++ .../recursive_imports/common.ts | 2 + .../info_json_location/__test__.jsonc | 4 + .../info_json_location.out | 0 .../info_missing_module/__test__.jsonc | 4 + .../error_009_missing_js_module.js | 1 + .../info_missing_module.out | 0 .../info_recursive_modules/__test__.jsonc | 5 + .../info_recursive_imports_test.out | 0 .../info_recursive_imports_test.ts | 5 + .../recursive_imports/A.ts | 7 + .../recursive_imports/B.ts | 7 + .../recursive_imports/C.ts | 8 ++ .../recursive_imports/common.ts | 2 + .../info_type_import/__test__.jsonc | 4 + .../info_type_import}/info_type_import.out | 0 .../info_type_import/info_type_import.ts | 3 + .../info_type_import/type_and_code.ts | 7 + .../specs/info_tests/json_file/__test__.jsonc | 5 + .../json_file}/json_output/main.out | 18 +-- .../info_tests/json_file}/json_output/main.ts | 2 +- tests/specs/info_tests/json_file/mod1.ts | 17 +++ tests/specs/info_tests/json_file/mod2.ts | 1 + .../specs/info_tests/json_file/print_hello.ts | 3 + .../json_file/subdir2/dynamic_import.ts | 4 + .../info_tests/json_file/subdir2/mod2.ts | 9 ++ .../multiple_imports/__test__.jsonc | 4 + .../multiple_imports}/multiple_imports.out | 0 .../types_header_direct/__test__.jsonc | 4 + .../types_header_direct/type_directives_01.ts | 3 + .../types_header_direct}/types_header.out | 0 .../with_config_override/__test__.jsonc | 4 + .../with_config/deno-override.json | 0 .../with_config/deno.json | 0 .../with_config/import_map.json | 0 .../with_config_override}/with_config/test.ts | 0 .../with_config/with_config.out | 0 .../testdata/info/054_info_local_imports.out | 9 -- tools/lint.js | 1 - 78 files changed, 270 insertions(+), 146 deletions(-) delete mode 100644 tests/integration/info_tests.rs create mode 100644 tests/specs/info_tests/_054_info_local_imports/005_more_imports.ts create mode 100644 tests/specs/info_tests/_054_info_local_imports/054_info_local_imports.out create mode 100644 tests/specs/info_tests/_054_info_local_imports/__test__.jsonc create mode 100644 tests/specs/info_tests/_054_info_local_imports/mod1.ts create mode 100644 tests/specs/info_tests/_054_info_local_imports/mod2.ts create mode 100644 tests/specs/info_tests/_054_info_local_imports/print_hello.ts create mode 100644 tests/specs/info_tests/_054_info_local_imports/subdir2/dynamic_import.ts create mode 100644 tests/specs/info_tests/_054_info_local_imports/subdir2/mod2.ts create mode 100644 tests/specs/info_tests/data_null_error/__test__.jsonc rename tests/{testdata/info => specs/info_tests/data_null_error}/data_null_error/data_null_error.out (100%) rename tests/{testdata/info => specs/info_tests/data_null_error}/data_null_error/mod.ts (100%) rename tests/{testdata/info => specs/info_tests/data_null_error}/data_null_error/types.d.ts (100%) create mode 100644 tests/specs/info_tests/info_dynamic_imports_tmpl_lit/__test__.jsonc create mode 100644 tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.info.out create mode 100644 tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.js create mode 100644 tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/data.json create mode 100644 tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/sub/data2.json create mode 100644 tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/a.js create mode 100644 tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/b.ts rename tests/{testdata/info => specs/info_tests/info_flag}/041_info_flag.out (100%) create mode 100644 tests/specs/info_tests/info_flag/__test__.jsonc rename tests/{testdata/info => specs/info_tests/info_flag_location}/041_info_flag_location.out (100%) create mode 100644 tests/specs/info_tests/info_flag_location/__test__.jsonc rename tests/{testdata/info => specs/info_tests/info_flag_script_jsx}/049_info_flag_script_jsx.out (100%) create mode 100644 tests/specs/info_tests/info_flag_script_jsx/__test__.jsonc create mode 100644 tests/specs/info_tests/info_import_map/__test__.jsonc rename tests/{testdata/info/with_import_map => specs/info_tests/info_import_map}/deno.json (100%) rename tests/{testdata/info/with_import_map => specs/info_tests/info_import_map}/deno.lock (100%) rename tests/{testdata/info/with_import_map => specs/info_tests/info_import_map}/main.tsx (100%) rename tests/{testdata/info/with_import_map => specs/info_tests/info_import_map}/with_import_map.out (100%) create mode 100644 tests/specs/info_tests/info_json/__test__.jsonc rename tests/{testdata/info => specs/info_tests/info_json}/info_json.out (100%) rename tests/{testdata/info => specs/info_tests/info_json_deps_order}/076_info_json_deps_order.out (100%) rename tests/{testdata/info => specs/info_tests/info_json_deps_order}/076_info_json_deps_order.ts (100%) create mode 100644 tests/specs/info_tests/info_json_deps_order/__test__.jsonc create mode 100644 tests/specs/info_tests/info_json_deps_order/recursive_imports/A.ts create mode 100644 tests/specs/info_tests/info_json_deps_order/recursive_imports/B.ts create mode 100644 tests/specs/info_tests/info_json_deps_order/recursive_imports/C.ts create mode 100644 tests/specs/info_tests/info_json_deps_order/recursive_imports/common.ts create mode 100644 tests/specs/info_tests/info_json_location/__test__.jsonc rename tests/{testdata/info => specs/info_tests/info_json_location}/info_json_location.out (100%) create mode 100644 tests/specs/info_tests/info_missing_module/__test__.jsonc create mode 100644 tests/specs/info_tests/info_missing_module/error_009_missing_js_module.js rename tests/{testdata/info => specs/info_tests/info_missing_module}/info_missing_module.out (100%) create mode 100644 tests/specs/info_tests/info_recursive_modules/__test__.jsonc rename tests/{testdata/info => specs/info_tests/info_recursive_modules}/info_recursive_imports_test.out (100%) create mode 100644 tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.ts create mode 100644 tests/specs/info_tests/info_recursive_modules/recursive_imports/A.ts create mode 100644 tests/specs/info_tests/info_recursive_modules/recursive_imports/B.ts create mode 100644 tests/specs/info_tests/info_recursive_modules/recursive_imports/C.ts create mode 100644 tests/specs/info_tests/info_recursive_modules/recursive_imports/common.ts create mode 100644 tests/specs/info_tests/info_type_import/__test__.jsonc rename tests/{testdata/info => specs/info_tests/info_type_import}/info_type_import.out (100%) create mode 100644 tests/specs/info_tests/info_type_import/info_type_import.ts create mode 100644 tests/specs/info_tests/info_type_import/type_and_code.ts create mode 100644 tests/specs/info_tests/json_file/__test__.jsonc rename tests/{testdata/info => specs/info_tests/json_file}/json_output/main.out (76%) rename tests/{testdata/info => specs/info_tests/json_file}/json_output/main.ts (64%) create mode 100644 tests/specs/info_tests/json_file/mod1.ts create mode 100644 tests/specs/info_tests/json_file/mod2.ts create mode 100644 tests/specs/info_tests/json_file/print_hello.ts create mode 100644 tests/specs/info_tests/json_file/subdir2/dynamic_import.ts create mode 100644 tests/specs/info_tests/json_file/subdir2/mod2.ts create mode 100644 tests/specs/info_tests/multiple_imports/__test__.jsonc rename tests/{testdata/info => specs/info_tests/multiple_imports}/multiple_imports.out (100%) create mode 100644 tests/specs/info_tests/types_header_direct/__test__.jsonc create mode 100644 tests/specs/info_tests/types_header_direct/type_directives_01.ts rename tests/{testdata/info => specs/info_tests/types_header_direct}/types_header.out (100%) create mode 100644 tests/specs/info_tests/with_config_override/__test__.jsonc rename tests/{testdata/info => specs/info_tests/with_config_override}/with_config/deno-override.json (100%) rename tests/{testdata/info => specs/info_tests/with_config_override}/with_config/deno.json (100%) rename tests/{testdata/info => specs/info_tests/with_config_override}/with_config/import_map.json (100%) rename tests/{testdata/info => specs/info_tests/with_config_override}/with_config/test.ts (100%) rename tests/{testdata/info => specs/info_tests/with_config_override}/with_config/with_config.out (100%) delete mode 100644 tests/testdata/info/054_info_local_imports.out diff --git a/tests/integration/info_tests.rs b/tests/integration/info_tests.rs deleted file mode 100644 index 7699baba87..0000000000 --- a/tests/integration/info_tests.rs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -use test_util as util; -use test_util::itest; -use util::TestContextBuilder; - -#[test] -fn info_lock_write() { - let context = TestContextBuilder::new().use_http_server().build(); - - context.temp_dir().write("deno.json", "{}"); - - let module_path = "http://127.0.0.1:4545/run/048_media_types_jsx.ts"; - - let output = context - .new_command() - .current_dir(context.temp_dir().path()) - .args_vec(["info", module_path]) - .run(); - output.assert_exit_code(0); - output.skip_output_check(); - - assert!( - context.temp_dir().path().join("deno.lock").exists(), - "missing deno.lock" - ); -} - -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!(info_flag { - args: "info", - output: "info/041_info_flag.out", -}); - -itest!(info_flag_location { - args: "info --location https://deno.land", - output: "info/041_info_flag_location.out", -}); - -itest!(info_json { - args: "info --json", - output: "info/info_json.out", -}); - -itest!(info_json_location { - args: "info --json --location https://deno.land", - output: "info/info_json_location.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!(json_file { - args: "info --quiet --json info/json_output/main.ts", - output: "info/json_output/main.out", - exit_code: 0, -}); - -itest!(info_json_deps_order { - args: "info --json info/076_info_json_deps_order.ts", - output: "info/076_info_json_deps_order.out", -}); - -itest!(info_missing_module { - args: "info info/error_009_missing_js_module.js", - output: "info/info_missing_module.out", -}); - -itest!(info_recursive_modules { - 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/info_type_import.ts", - output: "info/info_type_import.out", -}); - -itest!(_054_info_local_imports { - args: "info --quiet run/005_more_imports.ts", - output: "info/054_info_local_imports.out", - exit_code: 0, -}); - -// Tests for AssertionError where "data" is unexpectedly null when -// a file contains only triple slash references (#11196) -itest!(data_null_error { - args: "info info/data_null_error/mod.ts", - output: "info/data_null_error/data_null_error.out", -}); - -itest!(types_header_direct { - args: "info --reload run/type_directives_01.ts", - output: "info/types_header.out", - http_server: true, -}); - -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", -}); - -itest!(info_import_map { - args: "info preact/debug", - output: "info/with_import_map/with_import_map.out", - cwd: Some("info/with_import_map"), - copy_temp_dir: Some("info/with_import_map"), - exit_code: 0, -}); - -itest!(info_dynamic_imports_tmpl_lit { - args: "info compile/dynamic_imports_tmp_lit/main.js", - output: "compile/dynamic_imports_tmp_lit/main.info.out", - exit_code: 0, -}); diff --git a/tests/integration/mod.rs b/tests/integration/mod.rs index 159663233f..5cbe2a2ff3 100644 --- a/tests/integration/mod.rs +++ b/tests/integration/mod.rs @@ -23,8 +23,6 @@ mod eval; mod flags; #[path = "fmt_tests.rs"] mod fmt; -#[path = "info_tests.rs"] -mod info; #[path = "init_tests.rs"] mod init; #[path = "inspector_tests.rs"] diff --git a/tests/specs/info_tests/_054_info_local_imports/005_more_imports.ts b/tests/specs/info_tests/_054_info_local_imports/005_more_imports.ts new file mode 100644 index 0000000000..c69556be15 --- /dev/null +++ b/tests/specs/info_tests/_054_info_local_imports/005_more_imports.ts @@ -0,0 +1,11 @@ +import { printHello3, returnsFoo2, returnsHi } from "./mod1.ts"; + +printHello3(); + +if (returnsHi() !== "Hi") { + throw Error("Unexpected"); +} + +if (returnsFoo2() !== "Foo") { + throw Error("Unexpected"); +} diff --git a/tests/specs/info_tests/_054_info_local_imports/054_info_local_imports.out b/tests/specs/info_tests/_054_info_local_imports/054_info_local_imports.out new file mode 100644 index 0000000000..388168a8b6 --- /dev/null +++ b/tests/specs/info_tests/_054_info_local_imports/054_info_local_imports.out @@ -0,0 +1,9 @@ +local: [WILDCARD]005_more_imports.ts +type: TypeScript +dependencies: 3 unique +size: [WILDCARD] + +file://[WILDCARD]/005_more_imports.ts ([WILDCARD]) +└─┬ file://[WILDCARD]/mod1.ts ([WILDCARD]) + └─┬ file://[WILDCARD]/subdir2/mod2.ts ([WILDCARD]) + └── file://[WILDCARD]/print_hello.ts ([WILDCARD]) diff --git a/tests/specs/info_tests/_054_info_local_imports/__test__.jsonc b/tests/specs/info_tests/_054_info_local_imports/__test__.jsonc new file mode 100644 index 0000000000..4bfdfe1558 --- /dev/null +++ b/tests/specs/info_tests/_054_info_local_imports/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "info --quiet 005_more_imports.ts", + "output": "054_info_local_imports.out", + "exitCode": 0 +} diff --git a/tests/specs/info_tests/_054_info_local_imports/mod1.ts b/tests/specs/info_tests/_054_info_local_imports/mod1.ts new file mode 100644 index 0000000000..5e58f432ed --- /dev/null +++ b/tests/specs/info_tests/_054_info_local_imports/mod1.ts @@ -0,0 +1,17 @@ +import { printHello2, returnsFoo } from "./subdir2/mod2.ts"; + +export function returnsHi(): string { + return "Hi"; +} + +export function returnsFoo2(): string { + return returnsFoo(); +} + +export function printHello3() { + printHello2(); +} + +export function throwsError() { + throw Error("exception from mod1"); +} diff --git a/tests/specs/info_tests/_054_info_local_imports/mod2.ts b/tests/specs/info_tests/_054_info_local_imports/mod2.ts new file mode 100644 index 0000000000..ce1adc0e81 --- /dev/null +++ b/tests/specs/info_tests/_054_info_local_imports/mod2.ts @@ -0,0 +1 @@ +export { printHello } from "./print_hello.ts"; diff --git a/tests/specs/info_tests/_054_info_local_imports/print_hello.ts b/tests/specs/info_tests/_054_info_local_imports/print_hello.ts new file mode 100644 index 0000000000..b9c0ad5275 --- /dev/null +++ b/tests/specs/info_tests/_054_info_local_imports/print_hello.ts @@ -0,0 +1,3 @@ +export function printHello() { + console.log("Hello"); +} diff --git a/tests/specs/info_tests/_054_info_local_imports/subdir2/dynamic_import.ts b/tests/specs/info_tests/_054_info_local_imports/subdir2/dynamic_import.ts new file mode 100644 index 0000000000..59beb64c33 --- /dev/null +++ b/tests/specs/info_tests/_054_info_local_imports/subdir2/dynamic_import.ts @@ -0,0 +1,4 @@ +(async () => { + const { printHello } = await import("../mod2.ts"); + printHello(); +})(); diff --git a/tests/specs/info_tests/_054_info_local_imports/subdir2/mod2.ts b/tests/specs/info_tests/_054_info_local_imports/subdir2/mod2.ts new file mode 100644 index 0000000000..9071d0aeb4 --- /dev/null +++ b/tests/specs/info_tests/_054_info_local_imports/subdir2/mod2.ts @@ -0,0 +1,9 @@ +import { printHello } from "../print_hello.ts"; + +export function returnsFoo(): string { + return "Foo"; +} + +export function printHello2() { + printHello(); +} diff --git a/tests/specs/info_tests/data_null_error/__test__.jsonc b/tests/specs/info_tests/data_null_error/__test__.jsonc new file mode 100644 index 0000000000..782cca43d4 --- /dev/null +++ b/tests/specs/info_tests/data_null_error/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info data_null_error/mod.ts", + "output": "data_null_error/data_null_error.out" +} diff --git a/tests/testdata/info/data_null_error/data_null_error.out b/tests/specs/info_tests/data_null_error/data_null_error/data_null_error.out similarity index 100% rename from tests/testdata/info/data_null_error/data_null_error.out rename to tests/specs/info_tests/data_null_error/data_null_error/data_null_error.out diff --git a/tests/testdata/info/data_null_error/mod.ts b/tests/specs/info_tests/data_null_error/data_null_error/mod.ts similarity index 100% rename from tests/testdata/info/data_null_error/mod.ts rename to tests/specs/info_tests/data_null_error/data_null_error/mod.ts diff --git a/tests/testdata/info/data_null_error/types.d.ts b/tests/specs/info_tests/data_null_error/data_null_error/types.d.ts similarity index 100% rename from tests/testdata/info/data_null_error/types.d.ts rename to tests/specs/info_tests/data_null_error/data_null_error/types.d.ts diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/__test__.jsonc b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/__test__.jsonc new file mode 100644 index 0000000000..71f823a46f --- /dev/null +++ b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "info dynamic_imports_tmp_lit/main.js", + "output": "dynamic_imports_tmp_lit/main.info.out", + "exitCode": 0 +} diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.info.out b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.info.out new file mode 100644 index 0000000000..57d730a643 --- /dev/null +++ b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.info.out @@ -0,0 +1,10 @@ +local: [WILDCARD]main.js +type: JavaScript +dependencies: 4 unique +size: [WILDCARD] + +file:///[WILDCARD]/dynamic_imports_tmp_lit/main.js ([WILDCARD]) +├── file:///[WILDCARD]/dynamic_imports_tmp_lit/sub/a.js ([WILDCARD]) +├── file:///[WILDCARD]/dynamic_imports_tmp_lit/sub/b.ts ([WILDCARD]) +├── file:///[WILDCARD]/dynamic_imports_tmp_lit/other/data.json ([WILDCARD]) +└── file:///[WILDCARD]/dynamic_imports_tmp_lit/other/sub/data2.json ([WILDCARD]) diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.js b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.js new file mode 100644 index 0000000000..3bda597724 --- /dev/null +++ b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/main.js @@ -0,0 +1,14 @@ +const fileNames = [ + "a.js", + "b.ts", +]; + +for (const fileName of fileNames) { + await import(`./sub/${fileName}`); +} + +const jsonFileNames = ["data.json", "sub/data2.json"]; +for (const fileName of jsonFileNames) { + const mod = await import(`./other/${fileName}`, { with: { type: "json" } }); + console.log(mod.default); +} diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/data.json b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/data.json new file mode 100644 index 0000000000..0131e01e4b --- /dev/null +++ b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/data.json @@ -0,0 +1,3 @@ +{ + "data": 5 +} diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/sub/data2.json b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/sub/data2.json new file mode 100644 index 0000000000..858a13cdd1 --- /dev/null +++ b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/other/sub/data2.json @@ -0,0 +1,3 @@ +{ + "data": 1 +} diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/a.js b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/a.js new file mode 100644 index 0000000000..7b2a346011 --- /dev/null +++ b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/a.js @@ -0,0 +1 @@ +console.log("a"); diff --git a/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/b.ts b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/b.ts new file mode 100644 index 0000000000..6d012e7f1f --- /dev/null +++ b/tests/specs/info_tests/info_dynamic_imports_tmpl_lit/dynamic_imports_tmp_lit/sub/b.ts @@ -0,0 +1 @@ +console.log("b"); diff --git a/tests/testdata/info/041_info_flag.out b/tests/specs/info_tests/info_flag/041_info_flag.out similarity index 100% rename from tests/testdata/info/041_info_flag.out rename to tests/specs/info_tests/info_flag/041_info_flag.out diff --git a/tests/specs/info_tests/info_flag/__test__.jsonc b/tests/specs/info_tests/info_flag/__test__.jsonc new file mode 100644 index 0000000000..39b50c960e --- /dev/null +++ b/tests/specs/info_tests/info_flag/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info", + "output": "041_info_flag.out" +} diff --git a/tests/testdata/info/041_info_flag_location.out b/tests/specs/info_tests/info_flag_location/041_info_flag_location.out similarity index 100% rename from tests/testdata/info/041_info_flag_location.out rename to tests/specs/info_tests/info_flag_location/041_info_flag_location.out diff --git a/tests/specs/info_tests/info_flag_location/__test__.jsonc b/tests/specs/info_tests/info_flag_location/__test__.jsonc new file mode 100644 index 0000000000..436e7cd9a7 --- /dev/null +++ b/tests/specs/info_tests/info_flag_location/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info --location https://deno.land", + "output": "041_info_flag_location.out" +} diff --git a/tests/testdata/info/049_info_flag_script_jsx.out b/tests/specs/info_tests/info_flag_script_jsx/049_info_flag_script_jsx.out similarity index 100% rename from tests/testdata/info/049_info_flag_script_jsx.out rename to tests/specs/info_tests/info_flag_script_jsx/049_info_flag_script_jsx.out diff --git a/tests/specs/info_tests/info_flag_script_jsx/__test__.jsonc b/tests/specs/info_tests/info_flag_script_jsx/__test__.jsonc new file mode 100644 index 0000000000..b8dc305aea --- /dev/null +++ b/tests/specs/info_tests/info_flag_script_jsx/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info http://127.0.0.1:4545/run/048_media_types_jsx.ts", + "output": "049_info_flag_script_jsx.out" +} diff --git a/tests/specs/info_tests/info_import_map/__test__.jsonc b/tests/specs/info_tests/info_import_map/__test__.jsonc new file mode 100644 index 0000000000..725276925e --- /dev/null +++ b/tests/specs/info_tests/info_import_map/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "info preact/debug", + "output": "with_import_map.out", + "exitCode": 0 +} diff --git a/tests/testdata/info/with_import_map/deno.json b/tests/specs/info_tests/info_import_map/deno.json similarity index 100% rename from tests/testdata/info/with_import_map/deno.json rename to tests/specs/info_tests/info_import_map/deno.json diff --git a/tests/testdata/info/with_import_map/deno.lock b/tests/specs/info_tests/info_import_map/deno.lock similarity index 100% rename from tests/testdata/info/with_import_map/deno.lock rename to tests/specs/info_tests/info_import_map/deno.lock diff --git a/tests/testdata/info/with_import_map/main.tsx b/tests/specs/info_tests/info_import_map/main.tsx similarity index 100% rename from tests/testdata/info/with_import_map/main.tsx rename to tests/specs/info_tests/info_import_map/main.tsx diff --git a/tests/testdata/info/with_import_map/with_import_map.out b/tests/specs/info_tests/info_import_map/with_import_map.out similarity index 100% rename from tests/testdata/info/with_import_map/with_import_map.out rename to tests/specs/info_tests/info_import_map/with_import_map.out diff --git a/tests/specs/info_tests/info_json/__test__.jsonc b/tests/specs/info_tests/info_json/__test__.jsonc new file mode 100644 index 0000000000..4b50dc32ba --- /dev/null +++ b/tests/specs/info_tests/info_json/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info --json", + "output": "info_json.out" +} diff --git a/tests/testdata/info/info_json.out b/tests/specs/info_tests/info_json/info_json.out similarity index 100% rename from tests/testdata/info/info_json.out rename to tests/specs/info_tests/info_json/info_json.out diff --git a/tests/testdata/info/076_info_json_deps_order.out b/tests/specs/info_tests/info_json_deps_order/076_info_json_deps_order.out similarity index 100% rename from tests/testdata/info/076_info_json_deps_order.out rename to tests/specs/info_tests/info_json_deps_order/076_info_json_deps_order.out diff --git a/tests/testdata/info/076_info_json_deps_order.ts b/tests/specs/info_tests/info_json_deps_order/076_info_json_deps_order.ts similarity index 100% rename from tests/testdata/info/076_info_json_deps_order.ts rename to tests/specs/info_tests/info_json_deps_order/076_info_json_deps_order.ts diff --git a/tests/specs/info_tests/info_json_deps_order/__test__.jsonc b/tests/specs/info_tests/info_json_deps_order/__test__.jsonc new file mode 100644 index 0000000000..f474f4d380 --- /dev/null +++ b/tests/specs/info_tests/info_json_deps_order/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info --json 076_info_json_deps_order.ts", + "output": "076_info_json_deps_order.out" +} diff --git a/tests/specs/info_tests/info_json_deps_order/recursive_imports/A.ts b/tests/specs/info_tests/info_json_deps_order/recursive_imports/A.ts new file mode 100644 index 0000000000..43ecdbe5e4 --- /dev/null +++ b/tests/specs/info_tests/info_json_deps_order/recursive_imports/A.ts @@ -0,0 +1,7 @@ +import { B } from "./B.ts"; +import { thing } from "./common.ts"; + +export function A() { + thing(); + B(); +} diff --git a/tests/specs/info_tests/info_json_deps_order/recursive_imports/B.ts b/tests/specs/info_tests/info_json_deps_order/recursive_imports/B.ts new file mode 100644 index 0000000000..9fff0fdc9e --- /dev/null +++ b/tests/specs/info_tests/info_json_deps_order/recursive_imports/B.ts @@ -0,0 +1,7 @@ +import { C } from "./C.ts"; +import { thing } from "./common.ts"; + +export function B() { + thing(); + C(); +} diff --git a/tests/specs/info_tests/info_json_deps_order/recursive_imports/C.ts b/tests/specs/info_tests/info_json_deps_order/recursive_imports/C.ts new file mode 100644 index 0000000000..e47e77b41d --- /dev/null +++ b/tests/specs/info_tests/info_json_deps_order/recursive_imports/C.ts @@ -0,0 +1,8 @@ +import { A } from "./A.ts"; +import { thing } from "./common.ts"; + +export function C() { + if (A != null) { + thing(); + } +} diff --git a/tests/specs/info_tests/info_json_deps_order/recursive_imports/common.ts b/tests/specs/info_tests/info_json_deps_order/recursive_imports/common.ts new file mode 100644 index 0000000000..2b16a7bf14 --- /dev/null +++ b/tests/specs/info_tests/info_json_deps_order/recursive_imports/common.ts @@ -0,0 +1,2 @@ +export function thing() { +} diff --git a/tests/specs/info_tests/info_json_location/__test__.jsonc b/tests/specs/info_tests/info_json_location/__test__.jsonc new file mode 100644 index 0000000000..0c1acc3d9c --- /dev/null +++ b/tests/specs/info_tests/info_json_location/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info --json --location https://deno.land", + "output": "info_json_location.out" +} diff --git a/tests/testdata/info/info_json_location.out b/tests/specs/info_tests/info_json_location/info_json_location.out similarity index 100% rename from tests/testdata/info/info_json_location.out rename to tests/specs/info_tests/info_json_location/info_json_location.out diff --git a/tests/specs/info_tests/info_missing_module/__test__.jsonc b/tests/specs/info_tests/info_missing_module/__test__.jsonc new file mode 100644 index 0000000000..edc1519722 --- /dev/null +++ b/tests/specs/info_tests/info_missing_module/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info error_009_missing_js_module.js", + "output": "info_missing_module.out" +} diff --git a/tests/specs/info_tests/info_missing_module/error_009_missing_js_module.js b/tests/specs/info_tests/info_missing_module/error_009_missing_js_module.js new file mode 100644 index 0000000000..e6ca88934b --- /dev/null +++ b/tests/specs/info_tests/info_missing_module/error_009_missing_js_module.js @@ -0,0 +1 @@ +import "./bad-module.js"; diff --git a/tests/testdata/info/info_missing_module.out b/tests/specs/info_tests/info_missing_module/info_missing_module.out similarity index 100% rename from tests/testdata/info/info_missing_module.out rename to tests/specs/info_tests/info_missing_module/info_missing_module.out diff --git a/tests/specs/info_tests/info_recursive_modules/__test__.jsonc b/tests/specs/info_tests/info_recursive_modules/__test__.jsonc new file mode 100644 index 0000000000..c4313a2fbe --- /dev/null +++ b/tests/specs/info_tests/info_recursive_modules/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "info --quiet info_recursive_imports_test.ts", + "output": "info_recursive_imports_test.out", + "exitCode": 0 +} diff --git a/tests/testdata/info/info_recursive_imports_test.out b/tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.out similarity index 100% rename from tests/testdata/info/info_recursive_imports_test.out rename to tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.out diff --git a/tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.ts b/tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.ts new file mode 100644 index 0000000000..c9ba44755d --- /dev/null +++ b/tests/specs/info_tests/info_recursive_modules/info_recursive_imports_test.ts @@ -0,0 +1,5 @@ +import { A } from "./recursive_imports/A.ts"; + +export function test() { + A(); +} diff --git a/tests/specs/info_tests/info_recursive_modules/recursive_imports/A.ts b/tests/specs/info_tests/info_recursive_modules/recursive_imports/A.ts new file mode 100644 index 0000000000..43ecdbe5e4 --- /dev/null +++ b/tests/specs/info_tests/info_recursive_modules/recursive_imports/A.ts @@ -0,0 +1,7 @@ +import { B } from "./B.ts"; +import { thing } from "./common.ts"; + +export function A() { + thing(); + B(); +} diff --git a/tests/specs/info_tests/info_recursive_modules/recursive_imports/B.ts b/tests/specs/info_tests/info_recursive_modules/recursive_imports/B.ts new file mode 100644 index 0000000000..9fff0fdc9e --- /dev/null +++ b/tests/specs/info_tests/info_recursive_modules/recursive_imports/B.ts @@ -0,0 +1,7 @@ +import { C } from "./C.ts"; +import { thing } from "./common.ts"; + +export function B() { + thing(); + C(); +} diff --git a/tests/specs/info_tests/info_recursive_modules/recursive_imports/C.ts b/tests/specs/info_tests/info_recursive_modules/recursive_imports/C.ts new file mode 100644 index 0000000000..e47e77b41d --- /dev/null +++ b/tests/specs/info_tests/info_recursive_modules/recursive_imports/C.ts @@ -0,0 +1,8 @@ +import { A } from "./A.ts"; +import { thing } from "./common.ts"; + +export function C() { + if (A != null) { + thing(); + } +} diff --git a/tests/specs/info_tests/info_recursive_modules/recursive_imports/common.ts b/tests/specs/info_tests/info_recursive_modules/recursive_imports/common.ts new file mode 100644 index 0000000000..2b16a7bf14 --- /dev/null +++ b/tests/specs/info_tests/info_recursive_modules/recursive_imports/common.ts @@ -0,0 +1,2 @@ +export function thing() { +} diff --git a/tests/specs/info_tests/info_type_import/__test__.jsonc b/tests/specs/info_tests/info_type_import/__test__.jsonc new file mode 100644 index 0000000000..2092ecf08b --- /dev/null +++ b/tests/specs/info_tests/info_type_import/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info info_type_import.ts", + "output": "info_type_import.out" +} diff --git a/tests/testdata/info/info_type_import.out b/tests/specs/info_tests/info_type_import/info_type_import.out similarity index 100% rename from tests/testdata/info/info_type_import.out rename to tests/specs/info_tests/info_type_import/info_type_import.out diff --git a/tests/specs/info_tests/info_type_import/info_type_import.ts b/tests/specs/info_tests/info_type_import/info_type_import.ts new file mode 100644 index 0000000000..5d8ca21ced --- /dev/null +++ b/tests/specs/info_tests/info_type_import/info_type_import.ts @@ -0,0 +1,3 @@ +import { AnInterface as _, isAnInterface } from "./type_and_code.ts"; + +isAnInterface({}); diff --git a/tests/specs/info_tests/info_type_import/type_and_code.ts b/tests/specs/info_tests/info_type_import/type_and_code.ts new file mode 100644 index 0000000000..b147134195 --- /dev/null +++ b/tests/specs/info_tests/info_type_import/type_and_code.ts @@ -0,0 +1,7 @@ +export interface AnInterface { + a: string; +} + +export function isAnInterface(value: unknown): value is AnInterface { + return value && typeof value === "object" && "a" in value; +} diff --git a/tests/specs/info_tests/json_file/__test__.jsonc b/tests/specs/info_tests/json_file/__test__.jsonc new file mode 100644 index 0000000000..61289da947 --- /dev/null +++ b/tests/specs/info_tests/json_file/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "info --quiet --json json_output/main.ts", + "output": "json_output/main.out", + "exitCode": 0 +} diff --git a/tests/testdata/info/json_output/main.out b/tests/specs/info_tests/json_file/json_output/main.out similarity index 76% rename from tests/testdata/info/json_output/main.out rename to tests/specs/info_tests/json_file/json_output/main.out index 43c4f7398d..d4c2f234da 100644 --- a/tests/testdata/info/json_output/main.out +++ b/tests/specs/info_tests/json_file/json_output/main.out @@ -1,15 +1,15 @@ { "roots": [ - "file://[WILDCARD]/info/json_output/main.ts" + "file://[WILDCARD]/json_output/main.ts" ], "modules": [ { "kind": "esm", "dependencies": [ { - "specifier": "../../subdir/mod1.ts", + "specifier": "../mod1.ts", "code": { - "specifier": "file://[WILDCARD]/subdir/mod1.ts", + "specifier": "file://[WILDCARD]/mod1.ts", "span": { "start": { "line": 0, @@ -17,7 +17,7 @@ }, "end": { "line": 0, - "character": 74 + "character": 64 } } } @@ -34,7 +34,7 @@ { "specifier": "./subdir2/mod2.ts", "code": { - "specifier": "file://[WILDCARD]/subdir/subdir2/mod2.ts", + "specifier": "file://[WILDCARD]/subdir2/mod2.ts", "span": { "start": { "line": 0, @@ -51,14 +51,14 @@ "local": "[WILDCARD]mod1.ts", [WILDCARD] "mediaType": "TypeScript", - "specifier": "file://[WILDCARD]/subdir/mod1.ts" + "specifier": "file://[WILDCARD]/mod1.ts" }, { "kind": "esm", "local": "[WILDCARD]print_hello.ts", [WILDCARD] "mediaType": "TypeScript", - "specifier": "file://[WILDCARD]/subdir/print_hello.ts" + "specifier": "file://[WILDCARD]/print_hello.ts" }, { "kind": "esm", @@ -66,7 +66,7 @@ { "specifier": "../print_hello.ts", "code": { - "specifier": "file://[WILDCARD]/subdir/print_hello.ts", + "specifier": "file://[WILDCARD]/print_hello.ts", "span": { "start": { "line": 0, @@ -83,7 +83,7 @@ "local": "[WILDCARD]mod2.ts", [WILDCARD] "mediaType": "TypeScript", - "specifier": "file://[WILDCARD]/subdir/subdir2/mod2.ts" + "specifier": "file://[WILDCARD]/subdir2/mod2.ts" } ], "redirects": {}, diff --git a/tests/testdata/info/json_output/main.ts b/tests/specs/info_tests/json_file/json_output/main.ts similarity index 64% rename from tests/testdata/info/json_output/main.ts rename to tests/specs/info_tests/json_file/json_output/main.ts index 927bc55ed0..d9029af8af 100644 --- a/tests/testdata/info/json_output/main.ts +++ b/tests/specs/info_tests/json_file/json_output/main.ts @@ -1,4 +1,4 @@ -import { printHello3, returnsFoo2, returnsHi } from "../../subdir/mod1.ts"; +import { printHello3, returnsFoo2, returnsHi } from "../mod1.ts"; printHello3(); diff --git a/tests/specs/info_tests/json_file/mod1.ts b/tests/specs/info_tests/json_file/mod1.ts new file mode 100644 index 0000000000..5e58f432ed --- /dev/null +++ b/tests/specs/info_tests/json_file/mod1.ts @@ -0,0 +1,17 @@ +import { printHello2, returnsFoo } from "./subdir2/mod2.ts"; + +export function returnsHi(): string { + return "Hi"; +} + +export function returnsFoo2(): string { + return returnsFoo(); +} + +export function printHello3() { + printHello2(); +} + +export function throwsError() { + throw Error("exception from mod1"); +} diff --git a/tests/specs/info_tests/json_file/mod2.ts b/tests/specs/info_tests/json_file/mod2.ts new file mode 100644 index 0000000000..ce1adc0e81 --- /dev/null +++ b/tests/specs/info_tests/json_file/mod2.ts @@ -0,0 +1 @@ +export { printHello } from "./print_hello.ts"; diff --git a/tests/specs/info_tests/json_file/print_hello.ts b/tests/specs/info_tests/json_file/print_hello.ts new file mode 100644 index 0000000000..b9c0ad5275 --- /dev/null +++ b/tests/specs/info_tests/json_file/print_hello.ts @@ -0,0 +1,3 @@ +export function printHello() { + console.log("Hello"); +} diff --git a/tests/specs/info_tests/json_file/subdir2/dynamic_import.ts b/tests/specs/info_tests/json_file/subdir2/dynamic_import.ts new file mode 100644 index 0000000000..59beb64c33 --- /dev/null +++ b/tests/specs/info_tests/json_file/subdir2/dynamic_import.ts @@ -0,0 +1,4 @@ +(async () => { + const { printHello } = await import("../mod2.ts"); + printHello(); +})(); diff --git a/tests/specs/info_tests/json_file/subdir2/mod2.ts b/tests/specs/info_tests/json_file/subdir2/mod2.ts new file mode 100644 index 0000000000..9071d0aeb4 --- /dev/null +++ b/tests/specs/info_tests/json_file/subdir2/mod2.ts @@ -0,0 +1,9 @@ +import { printHello } from "../print_hello.ts"; + +export function returnsFoo(): string { + return "Foo"; +} + +export function printHello2() { + printHello(); +} diff --git a/tests/specs/info_tests/multiple_imports/__test__.jsonc b/tests/specs/info_tests/multiple_imports/__test__.jsonc new file mode 100644 index 0000000000..b110b2d4c6 --- /dev/null +++ b/tests/specs/info_tests/multiple_imports/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info http://127.0.0.1:4545/run/019_media_types.ts", + "output": "multiple_imports.out" +} diff --git a/tests/testdata/info/multiple_imports.out b/tests/specs/info_tests/multiple_imports/multiple_imports.out similarity index 100% rename from tests/testdata/info/multiple_imports.out rename to tests/specs/info_tests/multiple_imports/multiple_imports.out diff --git a/tests/specs/info_tests/types_header_direct/__test__.jsonc b/tests/specs/info_tests/types_header_direct/__test__.jsonc new file mode 100644 index 0000000000..7f9b462efa --- /dev/null +++ b/tests/specs/info_tests/types_header_direct/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info --reload type_directives_01.ts", + "output": "types_header.out" +} diff --git a/tests/specs/info_tests/types_header_direct/type_directives_01.ts b/tests/specs/info_tests/types_header_direct/type_directives_01.ts new file mode 100644 index 0000000000..71305824c7 --- /dev/null +++ b/tests/specs/info_tests/types_header_direct/type_directives_01.ts @@ -0,0 +1,3 @@ +import * as foo from "http://127.0.0.1:4545/xTypeScriptTypes.js"; + +console.log(foo.foo); diff --git a/tests/testdata/info/types_header.out b/tests/specs/info_tests/types_header_direct/types_header.out similarity index 100% rename from tests/testdata/info/types_header.out rename to tests/specs/info_tests/types_header_direct/types_header.out diff --git a/tests/specs/info_tests/with_config_override/__test__.jsonc b/tests/specs/info_tests/with_config_override/__test__.jsonc new file mode 100644 index 0000000000..02c7d2a78c --- /dev/null +++ b/tests/specs/info_tests/with_config_override/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info with_config/test.ts --config with_config/deno-override.json --import-map with_config/import_map.json", + "output": "with_config/with_config.out" +} diff --git a/tests/testdata/info/with_config/deno-override.json b/tests/specs/info_tests/with_config_override/with_config/deno-override.json similarity index 100% rename from tests/testdata/info/with_config/deno-override.json rename to tests/specs/info_tests/with_config_override/with_config/deno-override.json diff --git a/tests/testdata/info/with_config/deno.json b/tests/specs/info_tests/with_config_override/with_config/deno.json similarity index 100% rename from tests/testdata/info/with_config/deno.json rename to tests/specs/info_tests/with_config_override/with_config/deno.json diff --git a/tests/testdata/info/with_config/import_map.json b/tests/specs/info_tests/with_config_override/with_config/import_map.json similarity index 100% rename from tests/testdata/info/with_config/import_map.json rename to tests/specs/info_tests/with_config_override/with_config/import_map.json diff --git a/tests/testdata/info/with_config/test.ts b/tests/specs/info_tests/with_config_override/with_config/test.ts similarity index 100% rename from tests/testdata/info/with_config/test.ts rename to tests/specs/info_tests/with_config_override/with_config/test.ts diff --git a/tests/testdata/info/with_config/with_config.out b/tests/specs/info_tests/with_config_override/with_config/with_config.out similarity index 100% rename from tests/testdata/info/with_config/with_config.out rename to tests/specs/info_tests/with_config_override/with_config/with_config.out diff --git a/tests/testdata/info/054_info_local_imports.out b/tests/testdata/info/054_info_local_imports.out deleted file mode 100644 index ee1773b76b..0000000000 --- a/tests/testdata/info/054_info_local_imports.out +++ /dev/null @@ -1,9 +0,0 @@ -local: [WILDCARD]005_more_imports.ts -type: TypeScript -dependencies: 3 unique -size: [WILDCARD] - -file://[WILDCARD]/005_more_imports.ts ([WILDCARD]) -└─┬ file://[WILDCARD]/subdir/mod1.ts ([WILDCARD]) - └─┬ file://[WILDCARD]/subdir/subdir2/mod2.ts ([WILDCARD]) - └── file://[WILDCARD]/subdir/print_hello.ts ([WILDCARD]) diff --git a/tools/lint.js b/tools/lint.js index 013bd4930a..bcbf1c27eb 100755 --- a/tools/lint.js +++ b/tools/lint.js @@ -204,7 +204,6 @@ async function ensureNoNewITests() { "eval_tests.rs": 0, "flags_tests.rs": 0, "fmt_tests.rs": 16, - "info_tests.rs": 17, "init_tests.rs": 0, "inspector_tests.rs": 0, "install_tests.rs": 0,