diff options
-rw-r--r-- | cli/tests/testdata/test/pass.out | 5 | ||||
-rw-r--r-- | cli/tests/testdata/test/pass.ts | 5 | ||||
-rw-r--r-- | cli/tests/testdata/test/steps/output_within.out | 8 | ||||
-rw-r--r-- | cli/tools/test.rs | 8 |
4 files changed, 21 insertions, 5 deletions
diff --git a/cli/tests/testdata/test/pass.out b/cli/tests/testdata/test/pass.out index bb76e083f..f91286d2d 100644 --- a/cli/tests/testdata/test/pass.out +++ b/cli/tests/testdata/test/pass.out @@ -9,6 +9,11 @@ test 5 ... ok ([WILDCARD]) test 6 ... ok ([WILDCARD]) test 7 ... ok ([WILDCARD]) test 8 ... ok ([WILDCARD]) +test 9 ... +------- output ------- +console.log +console.error +----- output end ----- test 9 ... ok ([WILDCARD]) test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) diff --git a/cli/tests/testdata/test/pass.ts b/cli/tests/testdata/test/pass.ts index 288cc7c83..b41f58e45 100644 --- a/cli/tests/testdata/test/pass.ts +++ b/cli/tests/testdata/test/pass.ts @@ -7,4 +7,7 @@ Deno.test("test 5", () => {}); Deno.test("test 6", () => {}); Deno.test("test 7", () => {}); Deno.test("test 8", () => {}); -Deno.test("test 9", () => {}); +Deno.test("test 9", () => { + console.log("console.log"); + console.error("console.error"); +}); diff --git a/cli/tests/testdata/test/steps/output_within.out b/cli/tests/testdata/test/steps/output_within.out index e44843e29..0f5c95ce3 100644 --- a/cli/tests/testdata/test/steps/output_within.out +++ b/cli/tests/testdata/test/steps/output_within.out @@ -12,20 +12,20 @@ description ... ------- output ------- 3 ----- output end ----- - ok ([WILDCARD]ms) + inner 1 ... ok ([WILDCARD]ms) inner 2 ... ------- output ------- 4 ----- output end ----- - ok ([WILDCARD]ms) + inner 2 ... ok ([WILDCARD]ms) ------- output ------- 5 ----- output end ----- - ok ([WILDCARD]ms) + step 1 ... ok ([WILDCARD]ms) ------- output ------- 6 ----- output end ----- -ok ([WILDCARD]ms) +description ... ok ([WILDCARD]ms) [WILDCARD] diff --git a/cli/tools/test.rs b/cli/tools/test.rs index 1eb36671e..6ed443806 100644 --- a/cli/tools/test.rs +++ b/cli/tools/test.rs @@ -312,6 +312,10 @@ impl PrettyTestReporter { print!("{}", " ".repeat(description.level)); } + if wrote_user_output { + print!("{} ... ", description.name); + } + println!( "{} {}", status, @@ -414,6 +418,10 @@ impl TestReporter for PrettyTestReporter { print!(" "); } + if wrote_user_output { + print!("{} ... ", description.name); + } + let status = match result { TestResult::Ok => colors::green("ok").to_string(), TestResult::Ignored => colors::yellow("ignored").to_string(), |