mirror of
https://github.com/actions/node-versions.git
synced 2025-04-19 18:23:30 +00:00
Update Node.Tests.ps1
This commit is contained in:
parent
36b2cbcda8
commit
47252c228f
@ -35,16 +35,20 @@ Describe "Node.js" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
It "cached version is used without downloading" {
|
It "cached version is used without downloading" {
|
||||||
# Analyze output of previous steps to check if Node.js was consumed from cache or downloaded
|
# Check the architecture and OS before running the test
|
||||||
$useNodeLogFile = Get-UseNodeLogs
|
if (($env:PROCESSOR_ARCHITECTURE -ne 'ARM64') -or (($env:OS -ne 'Windows_NT') -and ($env:OS -ne 'Linux'))) {
|
||||||
if ($useNodeLogFile -eq $null) {
|
# Analyze output of previous steps to check if Node.js was consumed from cache or downloaded
|
||||||
Set-ItResult -Skipped -Because "Log file does not exist"
|
$useNodeLogFile = Get-UseNodeLogs
|
||||||
} else {
|
$useNodeLogFile | Should -Exist
|
||||||
$useNodeLogFile | Should -Exist
|
$useNodeLogContent = Get-Content $useNodeLogFile -Raw
|
||||||
$useNodeLogContent = Get-Content $useNodeLogFile -Raw
|
$useNodeLogContent | Should -Match "Found in cache"
|
||||||
}
|
} else {
|
||||||
|
# Skip the test for arm64 on Windows and Linux
|
||||||
|
Set-ItResult -Skipped -Because "Skipping this test for arm64 on Windows and Linux"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
It "Run simple code" {
|
It "Run simple code" {
|
||||||
"node ./simple-test.js" | Should -ReturnZeroExitCode
|
"node ./simple-test.js" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user