You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/Windows-Path-Repair-Full.Tests.ps1 uses Pester v3/v4 assertion syntax (Should Be, Should Not Throw). Under Pester 5 (the current default on modern systems) these fail with syntax errors, so the suite silently can't run for many contributors. There is also no CI, so regressions on either Windows PowerShell 5.1 or PowerShell 7 go unnoticed.
A related review finding: the suite only exercises injected seams, never real persistent behavior — actual SetEnvironmentVariable/registry read-back, backup creation on apply, restore application, scope selection (-UserPathOnly/-SystemPathOnly), non-elevated Machine preflight, and launcher quoting are all uncovered. Tests must still never modify the runner's real persistent PATH, so cover these via preview-mode runs, seams, and (where safe on a disposable CI runner) a dedicated scratch environment variable rather than Path itself.
Proposed fix
Migrate assertions to Pester 5 syntax (Should -Be, Should -Not -Throw), or pin Pester 4 explicitly in a test bootstrap — migration preferred.
Add a GitHub Actions workflow on windows-latest running the suite under both powershell (5.1) and pwsh (7).
Problem
tests/Windows-Path-Repair-Full.Tests.ps1uses Pester v3/v4 assertion syntax (Should Be,Should Not Throw). Under Pester 5 (the current default on modern systems) these fail with syntax errors, so the suite silently can't run for many contributors. There is also no CI, so regressions on either Windows PowerShell 5.1 or PowerShell 7 go unnoticed.A related review finding: the suite only exercises injected seams, never real persistent behavior — actual
SetEnvironmentVariable/registry read-back, backup creation on apply, restore application, scope selection (-UserPathOnly/-SystemPathOnly), non-elevated Machine preflight, and launcher quoting are all uncovered. Tests must still never modify the runner's real persistent PATH, so cover these via preview-mode runs, seams, and (where safe on a disposable CI runner) a dedicated scratch environment variable rather thanPathitself.Proposed fix
Should -Be,Should -Not -Throw), or pin Pester 4 explicitly in a test bootstrap — migration preferred.windows-latestrunning the suite under bothpowershell(5.1) andpwsh(7).