mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[Windows] Implement new directories hierarchy (#8616)
This commit is contained in:
committed by
GitHub
parent
84a7deae24
commit
d1f2c9a3be
25
images/windows/scripts/tests/Node.Tests.ps1
Normal file
25
images/windows/scripts/tests/Node.Tests.ps1
Normal file
@@ -0,0 +1,25 @@
|
||||
Describe "Node.JS" {
|
||||
Context "Basic modules"{
|
||||
It "<ToolName> " -TestCases @(
|
||||
@{ ToolName = "node" }
|
||||
@{ ToolName = "npm" }
|
||||
) {
|
||||
"$ToolName --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
$globalNpmPackages = (Get-ToolsetContent).npm.global_packages
|
||||
$globalNpmPackagesWithTests = $globalNpmPackages | Where-Object { $_.test } | ForEach-Object { @{ Name = $_.name; Test = $_.test } }
|
||||
|
||||
Context "Global NPM Packages" {
|
||||
It "<Name>" -TestCases $globalNpmPackagesWithTests {
|
||||
$Test | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Context "Node.js version" {
|
||||
It "Node.js version should correspond to the version in the toolset" {
|
||||
node --version | Should -BeLike "v$((Get-ToolsetContent).node.default)*"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user