File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,24 @@ Describe "Node.js" {
3535 }
3636
3737 It " cached version is used without downloading" {
38- # Analyze output of previous steps to check if Node.js was consumed from cache or downloaded
39- $useNodeLogFile = Get-UseNodeLogs
40- $useNodeLogFile | Should - Exist
41- $useNodeLogContent = Get-Content $useNodeLogFile - Raw
42- $useNodeLogContent | Should -Match " Found in cache"
38+ if ($env: RUNNER_TYPE -eq " GitHub" ) {
39+ # Analyze output of previous steps to check if Node.js was consumed from cache or downloaded
40+ $useNodeLogFile = Get-UseNodeLogs
41+ $useNodeLogFile | Should - Exist
42+ $useNodeLogContent = Get-Content $useNodeLogFile - Raw
43+ $useNodeLogContent | Should -Match " Found in cache"
44+ } else {
45+ # Get the installed version of Node.js
46+ $nodeVersion = Invoke-Expression " node --version"
47+ # Check if Node.js is installed
48+ $nodeVersion | Should -Not - BeNullOrEmpty
49+ # Check if the installed version of Node.js is the expected version
50+ $nodeVersion | Should -Match $env: VERSION
51+ }
4352 }
4453
54+
4555 It " Run simple code" {
4656 " node ./simple-test.js" | Should - ReturnZeroExitCode
4757 }
48- }
58+ }
You can’t perform that action at this time.
0 commit comments