diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/bench_tests.rs | 2 | ||||
-rw-r--r-- | tests/integration/cache_tests.rs | 2 | ||||
-rw-r--r-- | tests/integration/run_tests.rs | 2 | ||||
-rw-r--r-- | tests/integration/test_tests.rs | 2 | ||||
-rw-r--r-- | tests/specs/info/multiple_redirects/__test__.jsonc | 4 | ||||
-rw-r--r-- | tests/specs/info/multiple_redirects/main.out | 51 | ||||
-rw-r--r-- | tests/specs/info/multiple_redirects/main.ts | 2 |
7 files changed, 61 insertions, 4 deletions
diff --git a/tests/integration/bench_tests.rs b/tests/integration/bench_tests.rs index e0d3f8724..3306a0f96 100644 --- a/tests/integration/bench_tests.rs +++ b/tests/integration/bench_tests.rs @@ -280,7 +280,7 @@ fn conditionally_loads_type_graph() { .new_command() .args("bench --reload -L debug run/type_directives_js_main.js") .run(); - output.assert_matches_text("[WILDCARD] - FileFetcher::fetch() - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); + output.assert_matches_text("[WILDCARD] - FileFetcher::fetch_no_follow_with_options - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); let output = context .new_command() .args("bench --reload -L debug --no-check run/type_directives_js_main.js") diff --git a/tests/integration/cache_tests.rs b/tests/integration/cache_tests.rs index 988cbc996..ff206c654 100644 --- a/tests/integration/cache_tests.rs +++ b/tests/integration/cache_tests.rs @@ -177,5 +177,5 @@ fn loads_type_graph() { .new_command() .args("cache --reload -L debug run/type_directives_js_main.js") .run(); - output.assert_matches_text("[WILDCARD] - FileFetcher::fetch() - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); + output.assert_matches_text("[WILDCARD] - FileFetcher::fetch_no_follow_with_options - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); } diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs index e477a98d6..7b0bc78ed 100644 --- a/tests/integration/run_tests.rs +++ b/tests/integration/run_tests.rs @@ -1686,7 +1686,7 @@ fn type_directives_js_main() { .new_command() .args("run --reload -L debug --check run/type_directives_js_main.js") .run(); - output.assert_matches_text("[WILDCARD] - FileFetcher::fetch() - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); + output.assert_matches_text("[WILDCARD] - FileFetcher::fetch_no_follow_with_options - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); let output = context .new_command() .args("run --reload -L debug run/type_directives_js_main.js") diff --git a/tests/integration/test_tests.rs b/tests/integration/test_tests.rs index 33abdf22c..2bf2b3109 100644 --- a/tests/integration/test_tests.rs +++ b/tests/integration/test_tests.rs @@ -668,7 +668,7 @@ fn conditionally_loads_type_graph() { .new_command() .args("test --reload -L debug run/type_directives_js_main.js") .run(); - output.assert_matches_text("[WILDCARD] - FileFetcher::fetch() - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); + output.assert_matches_text("[WILDCARD] - FileFetcher::fetch_no_follow_with_options - specifier: file:///[WILDCARD]/subdir/type_reference.d.ts[WILDCARD]"); let output = context .new_command() .args("test --reload -L debug --no-check run/type_directives_js_main.js") diff --git a/tests/specs/info/multiple_redirects/__test__.jsonc b/tests/specs/info/multiple_redirects/__test__.jsonc new file mode 100644 index 000000000..0e1808e0a --- /dev/null +++ b/tests/specs/info/multiple_redirects/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "info --json main.ts", + "output": "main.out" +} diff --git a/tests/specs/info/multiple_redirects/main.out b/tests/specs/info/multiple_redirects/main.out new file mode 100644 index 000000000..bd18c1728 --- /dev/null +++ b/tests/specs/info/multiple_redirects/main.out @@ -0,0 +1,51 @@ +Download http://localhost:4548/subdir/redirects/redirect1.js +Download http://localhost:4546/subdir/redirects/redirect1.js +Download http://localhost:4545/subdir/redirects/redirect1.js +{ + "roots": [ + "file:///[WILDLINE]/multiple_redirects/main.ts" + ], + "modules": [ + { + "kind": "esm", + "dependencies": [ + { + "specifier": "http://localhost:4548/subdir/redirects/redirect1.js", + "code": { + "specifier": "http://localhost:4548/subdir/redirects/redirect1.js", + "span": { + "start": { + "line": 0, + "character": 22 + }, + "end": { + "line": 0, + "character": 75 + } + } + } + } + ], + "local": "[WILDLINE]main.ts", + "emit": null, + "map": null, + "size": 97, + "mediaType": "TypeScript", + "specifier": "file:///[WILDLINE]/multiple_redirects/main.ts" + }, + { + "kind": "esm", + "local": "[WILDLINE]", + "emit": null, + "map": null, + "size": 27, + "mediaType": "JavaScript", + "specifier": "http://localhost:4545/subdir/redirects/redirect1.js" + } + ], + "redirects": { + "http://localhost:4546/subdir/redirects/redirect1.js": "http://localhost:4545/subdir/redirects/redirect1.js", + "http://localhost:4548/subdir/redirects/redirect1.js": "http://localhost:4546/subdir/redirects/redirect1.js" + }, + "npmPackages": {} +} diff --git a/tests/specs/info/multiple_redirects/main.ts b/tests/specs/info/multiple_redirects/main.ts new file mode 100644 index 000000000..99287b39a --- /dev/null +++ b/tests/specs/info/multiple_redirects/main.ts @@ -0,0 +1,2 @@ +import { value } from "http://localhost:4548/subdir/redirects/redirect1.js"; +console.log(value); |