1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 04:52:26 -05:00

Compare commits

...

6 commits

Author SHA1 Message Date
Leo Lamprecht
4bbab495c8
Merge 2668bdc380 into e4a16e91fa 2025-01-20 10:10:08 +01:00
Leo Lamprecht
2668bdc380 [ci] Run CI 2024-10-11 15:35:23 +02:00
Leo Lamprecht
8dc211d47c Fixed test 2024-10-11 15:32:26 +02:00
Leo Lamprecht
630d5e63fe [ci] Ensure correct tests 2024-10-11 15:17:53 +02:00
Leo Lamprecht
21e4cbc4cd [ci] Run CI 2024-10-11 15:02:14 +02:00
Leo Lamprecht
f71829f9d7 Added empty line between test modules 2024-10-11 14:47:36 +02:00
2 changed files with 9 additions and 1 deletions

View file

@ -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,

View file

@ -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"