-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathrunTests.ps1
More file actions
18 lines (13 loc) · 750 Bytes
/
runTests.ps1
File metadata and controls
18 lines (13 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
param(
[ValidateSet("pwsh","powershell")][string]$env = "pwsh"
, [ValidateSet("mssql","mysql","postgre","oracle","sqlite")][string[]]$Tests = @("mssql","mysql","postgre","oracle","sqlite")
, [switch]$Interactive
)
$arglist = @()
$arglist += "-NoProfile", "-NoLogo"
if($Interactive){ $arglist += "-NoExit" }
$arglist += "-Command function prompt {'TESTING> '}; Import-Module .\Output\SimplySql; 'SimplySql Version: {0}' -f (Get-Module SimplySql | Select-Object -ExpandProperty Version)"
if($tests.count -gt 0) {
$arglist += "; Invoke-Pester @({0}) -output detailed" -f ($Tests.ForEach({"'.\Tests\$_.tests.ps1'"}) -join ", ")
}
Start-Process -FilePath $env -ArgumentList $arglist -NoNewWindow -Wait -WorkingDirectory $PSScriptRoot