From 2ff6e962553c064e54bdbcd5bba3a28d59174ac4 Mon Sep 17 00:00:00 2001 From: simwai <16225108+simwai@users.noreply.github.com> Date: Thu, 30 May 2024 23:54:30 +0200 Subject: [PATCH] Hopefully, fixed the failing GitHub action --- tests/setup.Tests.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/setup.Tests.ps1 b/tests/setup.Tests.ps1 index aaeefe230..601a1e0e8 100644 --- a/tests/setup.Tests.ps1 +++ b/tests/setup.Tests.ps1 @@ -22,17 +22,17 @@ Describe "Setup and Tests" { # Mock main to prevent it from running Mock Main {} - + . $SetupScriptPath } Context "Write-Log Tests" -Tag "Unit" { It "should write INFO level log" { Remove-Item $Global:LogFilePath -ErrorAction SilentlyContinue - + Write-Log -Message "Test Info Message" -Level "INFO" $Global:LogFilePath | Should -Exist - + $LogContent = Get-Content $Global:LogFilePath $LogContent | Should -Contain "INFO: Test Info Message" } @@ -153,12 +153,12 @@ Describe "Setup and Tests" { Mock Start-Process {} Mock Read-Host { return "Y" } } - + It "should exit with the given exit code without waiting for key press" { $ExitCode = Exit-Script -ExitCode 0 -isSubShell $true -waitForKeypress $false $ExitCode | Should -Be 0 } - + It "should prompt to open log file on error" { Exit-Script -ExitCode 1 -isSubShell $true -waitForKeypress $false Assert-MockCalled Read-Host -Exactly 1