diff --git a/tests/integration/watcher_tests.rs b/tests/integration/watcher_tests.rs index 122353bba9..5f236d7bda 100644 --- a/tests/integration/watcher_tests.rs +++ b/tests/integration/watcher_tests.rs @@ -894,11 +894,13 @@ async fn test_watch_basic() { bar_test.write("import bar from './bar.js'; Deno.test('bar', bar);"); assert_eq!(next_line(&mut stdout_lines).await.unwrap(), ""); + next_line(&mut stdout_lines).await; assert_contains!( next_line(&mut stdout_lines).await.unwrap(), "running 1 test" ); assert_contains!(next_line(&mut stdout_lines).await.unwrap(), "foo", "bar"); + next_line(&mut stdout_lines).await; assert_contains!( next_line(&mut stdout_lines).await.unwrap(), "running 1 test" @@ -913,6 +915,7 @@ async fn test_watch_basic() { foo_test.write("import foo from './foo.js'; Deno.test('foobar', foo);"); assert_contains!(next_line(&mut stderr_lines).await.unwrap(), "Restarting"); + next_line(&mut stdout_lines).await; assert_contains!( next_line(&mut stdout_lines).await.unwrap(), "running 1 test" @@ -927,6 +930,7 @@ async fn test_watch_basic() { let another_test = t.path().join("new_test.js"); another_test.write("Deno.test('another one', () => 3 + 3)"); assert_contains!(next_line(&mut stderr_lines).await.unwrap(), "Restarting"); + next_line(&mut stdout_lines).await; assert_contains!( next_line(&mut stdout_lines).await.unwrap(), "running 1 test" @@ -972,6 +976,7 @@ async fn test_watch_basic() { // Then restore the file another_test.write("Deno.test('another one', () => 3 + 3)"); assert_contains!(next_line(&mut stderr_lines).await.unwrap(), "Restarting"); + next_line(&mut stdout_lines).await; assert_contains!( next_line(&mut stdout_lines).await.unwrap(), "running 1 test" @@ -987,6 +992,7 @@ async fn test_watch_basic() { foo_file .write("export default function foo() { throw new Error('Whoops!'); }"); assert_contains!(next_line(&mut stderr_lines).await.unwrap(), "Restarting"); + next_line(&mut stdout_lines).await; assert_contains!( next_line(&mut stdout_lines).await.unwrap(), "running 1 test" @@ -999,6 +1005,7 @@ async fn test_watch_basic() { // Then restore the file foo_file.write("export default function foo() { 1 + 1 }"); assert_contains!(next_line(&mut stderr_lines).await.unwrap(), "Restarting"); + next_line(&mut stdout_lines).await; assert_contains!( next_line(&mut stdout_lines).await.unwrap(), "running 1 test"