refactor(flags): move watch flags into subcommand structs (#19516)

Moves the watch setting out of the `Flags` struct and into the
individual subcommands
This commit is contained in:
David Sherret 2023-06-15 13:09:37 -04:00 committed by GitHub
parent b2e546e530
commit fa63fd4610
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 248 additions and 120 deletions

View file

@ -385,6 +385,7 @@ async fn fmt_watch_test() {
wait_contains("Checked", &mut stderr_lines).await,
"Checked 1 file"
);
wait_contains("Fmt finished", &mut stderr_lines).await;
let expected = std::fs::read_to_string(fixed.clone()).unwrap();
let actual = std::fs::read_to_string(badly_formatted.clone()).unwrap();
@ -401,6 +402,7 @@ async fn fmt_watch_test() {
wait_contains("Checked", &mut stderr_lines).await,
"Checked 1 file"
);
wait_contains("Fmt finished", &mut stderr_lines).await;
// Check if file has been automatically formatted by watcher
let expected = std::fs::read_to_string(fixed).unwrap();