mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Add Start-PSPester function to replace pester.sh
Super basic function that should be rewritten.
This commit is contained in:
1 parent
b19fdb24ac
commit
a3cd2b3453
1 file changed
+15
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user