mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 04:52:26 -05:00
Compare commits
6 commits
e017033de0
...
4bbab495c8
Author | SHA1 | Date | |
---|---|---|---|
|
4bbab495c8 | ||
|
2668bdc380 | ||
|
8dc211d47c | ||
|
630d5e63fe | ||
|
21e4cbc4cd | ||
|
f71829f9d7 |
2 changed files with 9 additions and 1 deletions
|
@ -181,7 +181,7 @@ impl TestReporter for PrettyTestReporter {
|
|||
let inflection = if plan.total == 1 { "test" } else { "tests" };
|
||||
writeln!(
|
||||
&mut self.writer,
|
||||
"{}",
|
||||
"\n{}",
|
||||
colors::gray(format!(
|
||||
"running {} {} from {}",
|
||||
plan.total,
|
||||
|
|
|
@ -969,11 +969,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"
|
||||
|
@ -988,6 +990,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"
|
||||
|
@ -1002,6 +1005,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"
|
||||
|
@ -1015,6 +1019,7 @@ async fn test_watch_basic() {
|
|||
// Confirm that restarting occurs when a new file is updated
|
||||
another_test.write("Deno.test('another one', () => 3 + 3); Deno.test('another another one', () => 4 + 4)");
|
||||
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 2 tests"
|
||||
|
@ -1047,6 +1052,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"
|
||||
|
@ -1062,6 +1068,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"
|
||||
|
@ -1074,6 +1081,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"
|
||||
|
|
Loading…
Add table
Reference in a new issue