diff --git a/build.psm1 b/build.psm1 index 1bb08abfa6..15ed231845 100644 --- a/build.psm1 +++ b/build.psm1 @@ -356,7 +356,7 @@ function Start-PSPester { [string]$Directory = "$PSScriptRoot/test/powershell" ) - & (Get-PSOutput) -noprofile -c "Invoke-Pester $Flags $Directory/$Tests" + & (Get-PSOutput) -noprofile -c "Import-Module '$PSScriptRoot/src/Modules/Pester'; Invoke-Pester $Flags $Directory/$Tests" if ($LASTEXITCODE -ne 0) { throw "$LASTEXITCODE Pester tests failed" }