mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -05:00
fix(watcher): don't clear screen on start (#14351)
This commit is contained in:
parent
0cd61f2260
commit
db13e455ec
2 changed files with 0 additions and 14 deletions
|
@ -185,10 +185,6 @@ where
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if clear_screen {
|
|
||||||
eprint!("{}", CLEAR_SCREEN);
|
|
||||||
}
|
|
||||||
|
|
||||||
info!("{} {} started.", colors::intense_blue("Watcher"), job_name,);
|
info!("{} {} started.", colors::intense_blue("Watcher"), job_name,);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
|
|
@ -117,7 +117,6 @@ fn lint_watch_test() {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let (_stdout_lines, mut stderr_lines) = child_lines(&mut child);
|
let (_stdout_lines, mut stderr_lines) = child_lines(&mut child);
|
||||||
let next_line = stderr_lines.next().unwrap();
|
let next_line = stderr_lines.next().unwrap();
|
||||||
assert_contains!(&next_line, CLEAR_SCREEN);
|
|
||||||
assert_contains!(&next_line, "Lint started");
|
assert_contains!(&next_line, "Lint started");
|
||||||
let mut output = read_all_lints(&mut stderr_lines);
|
let mut output = read_all_lints(&mut stderr_lines);
|
||||||
let expected = std::fs::read_to_string(badly_linted_output).unwrap();
|
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 (_stdout_lines, mut stderr_lines) = child_lines(&mut child);
|
||||||
|
|
||||||
let next_line = stderr_lines.next().unwrap();
|
let next_line = stderr_lines.next().unwrap();
|
||||||
assert_contains!(&next_line, CLEAR_SCREEN);
|
|
||||||
assert_contains!(&next_line, "Lint started");
|
assert_contains!(&next_line, "Lint started");
|
||||||
let mut output = read_all_lints(&mut stderr_lines);
|
let mut output = read_all_lints(&mut stderr_lines);
|
||||||
let expected = std::fs::read_to_string(badly_linted_output).unwrap();
|
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 (_stdout_lines, mut stderr_lines) = child_lines(&mut child);
|
||||||
|
|
||||||
let next_line = stderr_lines.next().unwrap();
|
let next_line = stderr_lines.next().unwrap();
|
||||||
assert_contains!(&next_line, CLEAR_SCREEN);
|
|
||||||
assert_contains!(&next_line, "Fmt started");
|
assert_contains!(&next_line, "Fmt started");
|
||||||
assert_contains!(
|
assert_contains!(
|
||||||
skip_restarting_line(&mut stderr_lines),
|
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 (_stdout_lines, mut stderr_lines) = child_lines(&mut child);
|
||||||
|
|
||||||
let next_line = stderr_lines.next().unwrap();
|
let next_line = stderr_lines.next().unwrap();
|
||||||
assert_contains!(&next_line, CLEAR_SCREEN);
|
|
||||||
assert_contains!(&next_line, "Fmt started");
|
assert_contains!(&next_line, "Fmt started");
|
||||||
assert_contains!(
|
assert_contains!(
|
||||||
skip_restarting_line(&mut stderr_lines),
|
skip_restarting_line(&mut stderr_lines),
|
||||||
|
@ -407,7 +403,6 @@ fn bundle_js_watch() {
|
||||||
|
|
||||||
assert_contains!(stderr_lines.next().unwrap(), "Check");
|
assert_contains!(stderr_lines.next().unwrap(), "Check");
|
||||||
let next_line = stderr_lines.next().unwrap();
|
let next_line = stderr_lines.next().unwrap();
|
||||||
assert_contains!(&next_line, CLEAR_SCREEN);
|
|
||||||
assert_contains!(&next_line, "Bundle started");
|
assert_contains!(&next_line, "Bundle started");
|
||||||
assert_contains!(stderr_lines.next().unwrap(), "file_to_watch.ts");
|
assert_contains!(stderr_lines.next().unwrap(), "file_to_watch.ts");
|
||||||
assert_contains!(stderr_lines.next().unwrap(), "mod6.bundle.js");
|
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 (_stdout_lines, mut stderr_lines) = child_lines(&mut deno);
|
||||||
|
|
||||||
let next_line = stderr_lines.next().unwrap();
|
let next_line = stderr_lines.next().unwrap();
|
||||||
assert_contains!(&next_line, CLEAR_SCREEN);
|
|
||||||
assert_contains!(&next_line, "Bundle started");
|
assert_contains!(&next_line, "Bundle started");
|
||||||
assert_contains!(stderr_lines.next().unwrap(), "error:");
|
assert_contains!(stderr_lines.next().unwrap(), "error:");
|
||||||
assert_contains!(stderr_lines.next().unwrap(), "Bundle failed");
|
assert_contains!(stderr_lines.next().unwrap(), "Bundle failed");
|
||||||
|
@ -660,7 +654,6 @@ fn run_watch_load_unload_events() {
|
||||||
|
|
||||||
// Wait for the restart
|
// Wait for the restart
|
||||||
let next_line = stderr_lines.next().unwrap();
|
let next_line = stderr_lines.next().unwrap();
|
||||||
assert_contains!(&next_line, CLEAR_SCREEN);
|
|
||||||
assert_contains!(&next_line, "Process started");
|
assert_contains!(&next_line, "Process started");
|
||||||
assert_contains!(stderr_lines.next().unwrap(), "Restarting");
|
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 (mut stdout_lines, mut stderr_lines) = child_lines(&mut child);
|
||||||
|
|
||||||
let next_line = stderr_lines.next().unwrap();
|
let next_line = stderr_lines.next().unwrap();
|
||||||
assert_contains!(&next_line, CLEAR_SCREEN);
|
|
||||||
assert_contains!(&next_line, "Process started");
|
assert_contains!(&next_line, "Process started");
|
||||||
assert_contains!(stderr_lines.next().unwrap(), "error:");
|
assert_contains!(stderr_lines.next().unwrap(), "error:");
|
||||||
assert_contains!(stderr_lines.next().unwrap(), "Process failed");
|
assert_contains!(stderr_lines.next().unwrap(), "Process failed");
|
||||||
|
@ -757,7 +749,6 @@ fn run_watch_with_import_map_and_relative_paths() {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let (mut stdout_lines, mut stderr_lines) = child_lines(&mut child);
|
let (mut stdout_lines, mut stderr_lines) = child_lines(&mut child);
|
||||||
let next_line = stderr_lines.next().unwrap();
|
let next_line = stderr_lines.next().unwrap();
|
||||||
assert_contains!(&next_line, CLEAR_SCREEN);
|
|
||||||
assert_contains!(&next_line, "Process started");
|
assert_contains!(&next_line, "Process started");
|
||||||
assert_contains!(stderr_lines.next().unwrap(), "Process finished");
|
assert_contains!(stderr_lines.next().unwrap(), "Process finished");
|
||||||
assert_contains!(stdout_lines.next().unwrap(), "Hello world");
|
assert_contains!(stdout_lines.next().unwrap(), "Hello world");
|
||||||
|
@ -981,7 +972,6 @@ fn test_watch_module_graph_error_referrer() {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let (_, mut stderr_lines) = child_lines(&mut child);
|
let (_, mut stderr_lines) = child_lines(&mut child);
|
||||||
let line1 = stderr_lines.next().unwrap();
|
let line1 = stderr_lines.next().unwrap();
|
||||||
assert_contains!(&line1, CLEAR_SCREEN);
|
|
||||||
assert_contains!(&line1, "Process started");
|
assert_contains!(&line1, "Process started");
|
||||||
let line2 = stderr_lines.next().unwrap();
|
let line2 = stderr_lines.next().unwrap();
|
||||||
assert_contains!(&line2, "error: Module not found");
|
assert_contains!(&line2, "error: Module not found");
|
||||||
|
|
Loading…
Reference in a new issue