Skip to content

Commit 750f454

Browse files
committed
Fix container name in ScriptBlock BeforeAll failures (fixes #2636).
1 parent 81d46ce commit 750f454

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/functions/Output.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ function Get-WriteScreenPlugin ($Verbosity) {
571571
param ($Context)
572572

573573
if ($Context.Result.ErrorRecord.Count -gt 0) {
574-
$errorHeader = "[-] $($Context.Result.Item) failed with:"
574+
$errorHeader = "[-] $($Context.Result.Name) failed with:"
575575

576576
$formatErrorParams = @{
577577
Err = $Context.Result.ErrorRecord
@@ -592,13 +592,13 @@ function Get-WriteScreenPlugin ($Verbosity) {
592592
$humanTime = "$(Get-HumanTime ($Context.Result.Duration)) ($(Get-HumanTime $Context.Result.UserDuration)|$(Get-HumanTime $Context.Result.FrameworkDuration))"
593593

594594
if ($Context.Result.Passed) {
595-
Write-PesterHostMessage -ForegroundColor $ReportTheme.Pass "[+] $($Context.Result.Item)" -NoNewLine
595+
Write-PesterHostMessage -ForegroundColor $ReportTheme.Pass "[+] $($Context.Result.Name)" -NoNewLine
596596
Write-PesterHostMessage -ForegroundColor $ReportTheme.PassTime " $humanTime"
597597
}
598598

599599
# this won't work skipping the whole file when all it's tests are skipped is not a feature yet in 5.0.0
600600
if ($Context.Result.Skip) {
601-
Write-PesterHostMessage -ForegroundColor $ReportTheme.Skipped "[!] $($Context.Result.Item)" -NoNewLine
601+
Write-PesterHostMessage -ForegroundColor $ReportTheme.Skipped "[!] $($Context.Result.Name)" -NoNewLine
602602
Write-PesterHostMessage -ForegroundColor $ReportTheme.SkippedTime " $humanTime"
603603
}
604604
}

0 commit comments

Comments
 (0)