summaryrefslogtreecommitdiff
path: root/cli/tests/integration/test_tests.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-06-06 17:07:46 -0400
committerGitHub <noreply@github.com>2023-06-06 17:07:46 -0400
commit2aba4365ae620a8f097800e7cf85ff86f566b69a (patch)
tree5e3e9b30742455c72f2edc3fa5db0b7cbabe46e8 /cli/tests/integration/test_tests.rs
parent455b0eb8bb8445f80d9c80a9161f18c1dede5733 (diff)
perf(cli): conditionally load typescript declaration files (#19392)
Closes #18583
Diffstat (limited to 'cli/tests/integration/test_tests.rs')
-rw-r--r--cli/tests/integration/test_tests.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs
index 4dd29528f..cbaea36bd 100644
--- a/cli/tests/integration/test_tests.rs
+++ b/cli/tests/integration/test_tests.rs
@@ -3,6 +3,7 @@
use deno_core::url::Url;
use test_util as util;
use util::assert_contains;
+use util::assert_not_contains;
use util::env_vars_for_npm_tests;
use util::wildcard_match;
use util::TestContext;
@@ -566,3 +567,18 @@ fn test_with_glob_config_and_flags() {
assert_contains!(output, "glob/data/test1.js");
assert_contains!(output, "glob/data/test1.ts");
}
+
+#[test]
+fn conditionally_loads_type_graph() {
+ let context = TestContext::default();
+ let output = context
+ .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]");
+ let output = context
+ .new_command()
+ .args("test --reload -L debug --no-check run/type_directives_js_main.js")
+ .run();
+ assert_not_contains!(output.combined_output(), "type_reference.d.ts");
+}