Add Start-PSPester function to replace pester.sh

Super basic function that should be rewritten.
This commit is contained in:
Andrew Schwartzmeyer committed 2016-04-01 22:35:00 -07:00
1 parent b19fdb24ac
commit a3cd2b3453
1 file changed
+15
+15
View File
@@ -207,6 +207,21 @@ function Get-PSOutput {
}
function Start-PSPester {
[CmdletBinding()]param(
[string]$Flags = '-EnableExit -OutputFile pester-tests.xml -OutputFormat NUnitXml',
[string]$Tests = "*",
[ValidateScript({ Test-Path -PathType Container $_})]
[string]$Directory = "$PSScriptRoot/test/powershell"
)
& (Get-PSOutput) -c "Invoke-Pester $Flags $Directory/$Tests"
if ($LASTEXITCODE -ne 0) {
throw "$LASTEXITCODE Pester tests failed"
}
}
function Start-PSxUnit {
[CmdletBinding()]param()
if ($IsWindows) {