From 41acb1b79997bb095afe5b2262a0be7d4cbd682b Mon Sep 17 00:00:00 2001 From: David Matson Date: Wed, 29 Jan 2025 23:15:57 -0800 Subject: [PATCH] Remove dead code for Incomplete. (#2614) The block here appears to be unreachable code. Throw on invalid/unexpected test result types. --- src/functions/Output.ps1 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/functions/Output.ps1 b/src/functions/Output.ps1 index 5e8c3d0ea..08cf0a64b 100644 --- a/src/functions/Output.ps1 +++ b/src/functions/Output.ps1 @@ -714,13 +714,7 @@ function Get-WriteScreenPlugin ($Verbosity) { } default { - if ($PesterPreference.Output.Verbosity.Value -in 'Detailed', 'Diagnostic') { - # TODO: Add actual Incomplete status as default rather than checking for null time. - if ($null -eq $_test.Duration) { - Write-PesterHostMessage -ForegroundColor $ReportTheme.Incomplete "$margin[?] $out" -NoNewLine - Write-PesterHostMessage -ForegroundColor $ReportTheme.IncompleteTime " $humanTime" - } - } + throw "Invalid test result '$result'" } } }