diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-08-18 21:35:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-18 15:35:24 +0200 |
commit | 71e558c71c12a64aaf3a017c28fa4821c1d7a7ce (patch) | |
tree | c3192d8a96e7682642b24b4808d4df09a3ccf357 /cli/tests/integration/watcher_tests.rs | |
parent | a66218d457859fc3498db9fbc61228c74f490cc2 (diff) |
test: re-enable test watch tests and mark as flaky (#11669)
Diffstat (limited to 'cli/tests/integration/watcher_tests.rs')
-rw-r--r-- | cli/tests/integration/watcher_tests.rs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/cli/tests/integration/watcher_tests.rs b/cli/tests/integration/watcher_tests.rs index dff7e09bf..080e1f5b9 100644 --- a/cli/tests/integration/watcher_tests.rs +++ b/cli/tests/integration/watcher_tests.rs @@ -1,5 +1,6 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. +use flaky_test::flaky_test; use std::io::BufRead; use tempfile::TempDir; use test_util as util; @@ -427,9 +428,7 @@ fn run_watch_with_import_map_and_relative_paths() { temp_directory.close().unwrap(); } -// TODO(bartlomieju): flaky (https://github.com/denoland/deno/issues/10552) -#[ignore] -#[test] +#[flaky_test] fn test_watch() { macro_rules! assert_contains { ($string:expr, $($test:expr),+) => { @@ -462,9 +461,10 @@ fn test_watch() { let mut stderr_lines = std::io::BufReader::new(stderr).lines().map(|r| r.unwrap()); + assert_eq!(stdout_lines.next().unwrap(), ""); assert_contains!( stdout_lines.next().unwrap(), - "No matching test modules found" + "0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out" ); wait_for_process_finished("Test", &mut stderr_lines); @@ -487,6 +487,7 @@ fn test_watch() { ) .expect("error writing file"); + assert_eq!(stdout_lines.next().unwrap(), ""); assert_contains!(stdout_lines.next().unwrap(), "running 1 test"); assert_contains!(stdout_lines.next().unwrap(), "foo", "bar"); assert_contains!(stdout_lines.next().unwrap(), "running 1 test"); @@ -596,9 +597,7 @@ fn test_watch() { drop(t); } -// TODO(bartlomieju): flaky (https://github.com/denoland/deno/issues/10552) -#[ignore] -#[test] +#[flaky_test] fn test_watch_doc() { macro_rules! assert_contains { ($string:expr, $($test:expr),+) => { @@ -631,11 +630,11 @@ fn test_watch_doc() { let mut stderr_lines = std::io::BufReader::new(stderr).lines().map(|r| r.unwrap()); + assert_eq!(stdout_lines.next().unwrap(), ""); assert_contains!( stdout_lines.next().unwrap(), - "No matching test modules found" + "0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out" ); - wait_for_process_finished("Test", &mut stderr_lines); let foo_file = t.path().join("foo.ts"); |