Update Node.Tests.ps1

This commit is contained in:
gowridurgad 2024-06-26 17:44:26 +05:30 committed by GitHub
parent 921e8d9f35
commit f89b01ffb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,8 +40,10 @@ Describe "Node.js" {
} }
It "cached version is used without downloading" { It "cached version is used without downloading" {
# Check the architecture and OS before running the test # Set a custom variable to check for architecture and OS
if (($env:PROCESSOR_ARCHITECTURE -ne 'ARM64') -or (($env:OS -ne 'Windows_NT') -and ($env:OS -ne 'Linux'))) { $isArm64WindowsOrLinux = if ((uname -m) -eq 'aarch64' -and ((uname -o) -eq 'GNU/Linux' -or $IsWindows)) {$true} else {$false}
if (!$isArm64WindowsOrLinux) {
# Analyze output of previous steps to check if Node.js was consumed from cache or downloaded # Analyze output of previous steps to check if Node.js was consumed from cache or downloaded
$useNodeLogFile = Get-UseNodeLogs $useNodeLogFile = Get-UseNodeLogs
$useNodeLogFile | Should -Exist $useNodeLogFile | Should -Exist
@ -51,7 +53,7 @@ Describe "Node.js" {
# Skip the test for arm64 on Windows and Linux # Skip the test for arm64 on Windows and Linux
Set-ItResult -Skipped -Because "Skipping this 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" {