From d693730c54e8fe75a7bb3e6c9a1919649033ee37 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Thu, 9 Jul 2020 13:22:07 +0300 Subject: [PATCH] fix comments --- images/win/scripts/ImageHelpers/TestsHelpers.ps1 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/ImageHelpers/TestsHelpers.ps1 b/images/win/scripts/ImageHelpers/TestsHelpers.ps1 index fdc341cc..5f8b5809 100644 --- a/images/win/scripts/ImageHelpers/TestsHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/TestsHelpers.ps1 @@ -69,15 +69,15 @@ function Invoke-PesterTests { # Fail in case if no tests are run if (-not ($results -and ($results.FailedCount -eq 0) -and ($results.PassedCount -gt 0))) { $results - throw "Test run has finished with errors" + throw "Test run has failed" } } # Pester Assert to check exit code of command function ShouldReturnZeroExitCode { Param( - [String]$ActualValue, - [switch]$Negate, + [String] $ActualValue, + [switch] $Negate, [string] $Because ) @@ -86,8 +86,6 @@ function ShouldReturnZeroExitCode { [bool]$succeeded = $result.ExitCode -eq 0 if ($Negate) { $succeeded = -not $succeeded } - - if (-not $succeeded) { $CommandResultIndent = " " * 4