mirror of https://github.com/jdx/mise
test: added windows e2e tests (#2645)
This commit is contained in:
parent
4a71ef21ac
commit
d9c2b30e80
|
@ -25,3 +25,4 @@ megalinter-reports/
|
|||
.dev/
|
||||
|
||||
.vscode/
|
||||
testResults.xml
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
$ErrorActionPreference = "Stop"
|
||||
|
||||
function assert {
|
||||
param($condition, $message)
|
||||
if ($condition) {
|
||||
Write-Host "Test passed: $message"
|
||||
} else {
|
||||
Write-Host "Test failed: $message"
|
||||
exit 1
|
||||
}
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
|
||||
Describe 'node' {
|
||||
It 'executes node 22.0.0' {
|
||||
mise x node@22.0.0 -- node -v
|
||||
mise x node@22.0.0 -- where node
|
||||
mise x node@22.0.0 -- set
|
||||
mise x node@22.0.0 -- node -v | Should -be "v22.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
$ErrorActionPreference = "Stop"
|
||||
$PSNativeCommandUseErrorActionPreference = $true
|
||||
Set-StrictMode -Version Latest
|
||||
$config = New-PesterConfiguration
|
||||
$config.Run.Path = $PSScriptRoot
|
||||
$config.Run.Exit = $true
|
||||
$config.TestResult.Enabled = $true
|
||||
|
||||
Install-Module -Name Pester
|
||||
$env:MISE_DEBUG = "1"
|
||||
|
||||
Invoke-Pester -Output Detailed e2e-win
|
||||
# foreach($file in Get-ChildItem -Path .\e2e-win -Filter test_*.ps1) {
|
||||
# Write-Output "Running $($file.Name)"
|
||||
# pwsh -File $file
|
||||
# }
|
||||
#
|
||||
Write-Output "All tests passed"
|
||||
Invoke-Pester -Configuration $config
|
||||
|
|
Loading…
Reference in New Issue