task/Test/TestModuleImport.ps1
BuildTask TestModuleImport -Stage Test -Order 0 -Definition { Start-Job -ArgumentList $buildInfo -ScriptBlock { param ( $buildInfo ) $path = Join-Path $buildInfo.Path.Source 'test*' if (Test-Path (Join-Path $path 'stub')) { Get-ChildItem (Join-Path $path 'stub') -Filter *.psm1 -Recurse -Depth 1 | ForEach-Object { Import-Module $_.FullName -Global -WarningAction SilentlyContinue } } Import-Module $buildInfo.Path.Manifest.FullName -ErrorAction Stop } | Receive-Job -Wait -ErrorAction Stop } |