mirror of
https://github.com/actions/node-versions.git
synced 2025-04-20 02:43:49 +00:00
Update Node.Tests.ps1
This commit is contained in:
parent
4698451ff9
commit
d9d6de2703
@ -13,7 +13,7 @@ BeforeAll {
|
|||||||
} | Select-Object -First 1
|
} | Select-Object -First 1
|
||||||
return $useNodeLogFile.Fullname
|
return $useNodeLogFile.Fullname
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Directory '$logsFolderPath' does not exist."
|
|
||||||
return $null
|
return $null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -40,13 +40,15 @@ 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
|
$useNodeLogFile = Get-UseNodeLogs
|
||||||
$useNodeLogFile = Get-UseNodeLogs
|
if ($useNodeLogFile -eq $null) {
|
||||||
|
Skip "Log file does not exist"
|
||||||
|
} else {
|
||||||
$useNodeLogFile | Should -Exist
|
$useNodeLogFile | Should -Exist
|
||||||
$useNodeLogContent = Get-Content $useNodeLogFile -Raw
|
$useNodeLogContent = Get-Content $useNodeLogFile -Raw
|
||||||
$useNodeLogContent | Should -Match "Found in cache"
|
$useNodeLogContent | Should -Match "Found in cache"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
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