Skip to content

Commit

Permalink
UX update for list of failed tests
Browse files Browse the repository at this point in the history
The line "The following tests failed: " was appearing when there were
no test failures. This update simply updates it to only display when
there are failed tests.
  • Loading branch information
nicrowe00 committed May 13, 2024
1 parent cec2ad6 commit 6245ebd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Turkey/TestOutputFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,14 @@ public async override Task AfterRunningTestAsync(string name, TestResult result,

public async override Task PrintFailedTests()
{
Console.WriteLine();
Console.WriteLine("The following tests failed: ");
foreach(var test in failedTests)
if (failedTests.Count != 0)
{
Console.WriteLine($"{string.Format("{0,-30}", test.Name)}({test.Duration})");
Console.WriteLine();
Console.WriteLine("The following tests failed: ");
foreach(var test in failedTests)
{
Console.WriteLine($"{string.Format("{0,-30}", test.Name)}({test.Duration})");
}
}
}

Expand Down

0 comments on commit 6245ebd

Please sign in to comment.