From a92895a25411bd06f7c767d0f76850ac8c8f457f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Fri, 17 May 2024 23:18:13 +0200 Subject: [PATCH] Add count --- src/functions/Output.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/functions/Output.ps1 b/src/functions/Output.ps1 index 48dedbd14..708b872c6 100644 --- a/src/functions/Output.ps1 +++ b/src/functions/Output.ps1 @@ -670,11 +670,11 @@ function Get-WriteScreenPlugin ($Verbosity) { } if ('Normal' -eq $PesterPreference.Output.Verbosity.Value) { - $humanTime = "$(Get-HumanTime ($Context.Result.Duration)) ($(Get-HumanTime $Context.Result.UserDuration)|$(Get-HumanTime $Context.Result.FrameworkDuration))" + $humanTime = Get-HumanTime $Context.Result.Duration if ($Context.Result.Passed) { Write-PesterHostMessage -ForegroundColor $ReportTheme.Pass "[+] $($Context.Result.Item)" -NoNewLine - Write-PesterHostMessage -ForegroundColor $ReportTheme.PassTime " $humanTime" + Write-PesterHostMessage -ForegroundColor $ReportTheme.PassTime " $(if (1 -eq $Context.Result.PassedCount) { "1 test" } else { "$($Context.Result.PassedCount) tests" }) in $humanTime " } # this won't work skipping the whole file when all it's tests are skipped is not a feature yet in 5.0.0 @@ -728,7 +728,7 @@ function Get-WriteScreenPlugin ($Verbosity) { throw "Unsupported level of output '$($PesterPreference.Output.Verbosity.Value)'" } - $humanTime = "$(Get-HumanTime ($_test.Duration)) ($(Get-HumanTime $_test.UserDuration)|$(Get-HumanTime $_test.FrameworkDuration))" + $humanTime = Get-HumanTime $_test.Duration if ($PesterPreference.Debug.ShowNavigationMarkers.Value) { $out += ", $($_test.ScriptBlock.File):$($_Test.StartLine)"