From 3215c260532d4d08467f9a050cfb51f677564b13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 21 Apr 2022 17:21:59 +0200 Subject: [PATCH] fix(watcher): don't clear screen on start (#14351) --- cli/file_watcher.rs | 4 ---- cli/tests/integration/watcher_tests.rs | 10 ---------- 2 files changed, 14 deletions(-) diff --git a/cli/file_watcher.rs b/cli/file_watcher.rs index c326eb7dd3..3c74237caa 100644 --- a/cli/file_watcher.rs +++ b/cli/file_watcher.rs @@ -185,10 +185,6 @@ where } }; - if clear_screen { - eprint!("{}", CLEAR_SCREEN); - } - info!("{} {} started.", colors::intense_blue("Watcher"), job_name,); loop { diff --git a/cli/tests/integration/watcher_tests.rs b/cli/tests/integration/watcher_tests.rs index 939a11c0c9..a74b7a6d33 100644 --- a/cli/tests/integration/watcher_tests.rs +++ b/cli/tests/integration/watcher_tests.rs @@ -117,7 +117,6 @@ fn lint_watch_test() { .unwrap(); let (_stdout_lines, mut stderr_lines) = child_lines(&mut child); let next_line = stderr_lines.next().unwrap(); - assert_contains!(&next_line, CLEAR_SCREEN); assert_contains!(&next_line, "Lint started"); let mut output = read_all_lints(&mut stderr_lines); let expected = std::fs::read_to_string(badly_linted_output).unwrap(); @@ -176,7 +175,6 @@ fn lint_watch_without_args_test() { let (_stdout_lines, mut stderr_lines) = child_lines(&mut child); let next_line = stderr_lines.next().unwrap(); - assert_contains!(&next_line, CLEAR_SCREEN); assert_contains!(&next_line, "Lint started"); let mut output = read_all_lints(&mut stderr_lines); let expected = std::fs::read_to_string(badly_linted_output).unwrap(); @@ -265,7 +263,6 @@ fn fmt_watch_test() { let (_stdout_lines, mut stderr_lines) = child_lines(&mut child); let next_line = stderr_lines.next().unwrap(); - assert_contains!(&next_line, CLEAR_SCREEN); assert_contains!(&next_line, "Fmt started"); assert_contains!( skip_restarting_line(&mut stderr_lines), @@ -314,7 +311,6 @@ fn fmt_watch_without_args_test() { let (_stdout_lines, mut stderr_lines) = child_lines(&mut child); let next_line = stderr_lines.next().unwrap(); - assert_contains!(&next_line, CLEAR_SCREEN); assert_contains!(&next_line, "Fmt started"); assert_contains!( skip_restarting_line(&mut stderr_lines), @@ -407,7 +403,6 @@ fn bundle_js_watch() { assert_contains!(stderr_lines.next().unwrap(), "Check"); let next_line = stderr_lines.next().unwrap(); - assert_contains!(&next_line, CLEAR_SCREEN); assert_contains!(&next_line, "Bundle started"); assert_contains!(stderr_lines.next().unwrap(), "file_to_watch.ts"); assert_contains!(stderr_lines.next().unwrap(), "mod6.bundle.js"); @@ -459,7 +454,6 @@ fn bundle_watch_not_exit() { let (_stdout_lines, mut stderr_lines) = child_lines(&mut deno); let next_line = stderr_lines.next().unwrap(); - assert_contains!(&next_line, CLEAR_SCREEN); assert_contains!(&next_line, "Bundle started"); assert_contains!(stderr_lines.next().unwrap(), "error:"); assert_contains!(stderr_lines.next().unwrap(), "Bundle failed"); @@ -660,7 +654,6 @@ fn run_watch_load_unload_events() { // Wait for the restart let next_line = stderr_lines.next().unwrap(); - assert_contains!(&next_line, CLEAR_SCREEN); assert_contains!(&next_line, "Process started"); assert_contains!(stderr_lines.next().unwrap(), "Restarting"); @@ -697,7 +690,6 @@ fn run_watch_not_exit() { let (mut stdout_lines, mut stderr_lines) = child_lines(&mut child); let next_line = stderr_lines.next().unwrap(); - assert_contains!(&next_line, CLEAR_SCREEN); assert_contains!(&next_line, "Process started"); assert_contains!(stderr_lines.next().unwrap(), "error:"); assert_contains!(stderr_lines.next().unwrap(), "Process failed"); @@ -757,7 +749,6 @@ fn run_watch_with_import_map_and_relative_paths() { .unwrap(); let (mut stdout_lines, mut stderr_lines) = child_lines(&mut child); let next_line = stderr_lines.next().unwrap(); - assert_contains!(&next_line, CLEAR_SCREEN); assert_contains!(&next_line, "Process started"); assert_contains!(stderr_lines.next().unwrap(), "Process finished"); assert_contains!(stdout_lines.next().unwrap(), "Hello world"); @@ -981,7 +972,6 @@ fn test_watch_module_graph_error_referrer() { .unwrap(); let (_, mut stderr_lines) = child_lines(&mut child); let line1 = stderr_lines.next().unwrap(); - assert_contains!(&line1, CLEAR_SCREEN); assert_contains!(&line1, "Process started"); let line2 = stderr_lines.next().unwrap(); assert_contains!(&line2, "error: Module not found");