mirror of
https://github.com/freedbygrace/PSOPNSenseAPI.git
synced 2026-07-26 20:08:30 +00:00
24 lines
551 B
PowerShell
24 lines
551 B
PowerShell
[CmdletBinding()]
|
|
param (
|
|
[Parameter()]
|
|
[string]
|
|
$Configuration = "Debug"
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
# Define paths
|
|
$rootDir = Split-Path -Parent $PSScriptRoot
|
|
$srcDir = Join-Path -Path $rootDir -ChildPath "src"
|
|
$testDir = Join-Path -Path $srcDir -ChildPath "PSOPNSenseAPI.Tests"
|
|
|
|
# Run the tests
|
|
Write-Verbose "Running tests in $Configuration configuration"
|
|
dotnet test "$testDir" -c $Configuration
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
throw "Tests failed with exit code $LASTEXITCODE"
|
|
}
|
|
|
|
Write-Output "Tests completed successfully!"
|