Skip to content

Commit

Permalink
Add script to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmelton committed Jan 6, 2021
1 parent 227585c commit 0f2fa35
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/runTests.ps1
@@ -0,0 +1,15 @@
$testRootPath = $PSScriptRoot
$modulePsd1 = [IO.Path]::Combine(($PSScriptRoot.Trim("tests")), 'src\Thycotic.SecretServer.psd1')
$module = Import-Module $modulePsd1 -Force -PassThru

Write-Host "Testing module version $($module.Version)" -BackgroundColor DarkGreen -ForegroundColor Black
try {
if (-not (Get-Module Pester)) {
Import-Module Pester -RequiredVersion 5.1.0
}
} catch {
Write-Error "Pester 5.1.0 was not imported, please correct"
return
}

Invoke-Pester -Path $testRootPath -Output Minimal

0 comments on commit 0f2fa35

Please sign in to comment.