summaryrefslogtreecommitdiff
path: root/cli/tools/test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/test.rs')
-rw-r--r--cli/tools/test.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/cli/tools/test.rs b/cli/tools/test.rs
index 159de8ec8..dc48ab9e5 100644
--- a/cli/tools/test.rs
+++ b/cli/tools/test.rs
@@ -1726,12 +1726,15 @@ pub async fn run_tests_with_watch(
}
});
- let clear_screen = !flags.no_clear_screen;
file_watcher::watch_func(
flags,
file_watcher::PrintConfig {
job_name: "Test".to_string(),
- clear_screen,
+ clear_screen: !test_flags
+ .watch
+ .as_ref()
+ .map(|w| !w.no_clear_screen)
+ .unwrap_or(true),
},
move |flags, sender, changed_paths| {
let test_flags = test_flags.clone();
@@ -1743,9 +1746,7 @@ pub async fn run_tests_with_watch(
let cli_options = factory.cli_options();
let test_options = cli_options.resolve_test_options(test_flags)?;
- if let Some(watch_paths) = cli_options.watch_paths() {
- let _ = sender.send(watch_paths);
- }
+ let _ = sender.send(cli_options.watch_paths());
let _ = sender.send(test_options.files.include.clone());
let graph_kind = cli_options.type_check_mode().as_graph_kind();