Files
runner-images/images/ubuntu/scripts/tests/Node.Tests.ps1
Shamil Mubarakshin dbb10c67ba [ubuntu] Refactor pester tests (#9006)
* [ubuntu] Refactor pester tests

* Fix key name and add BeforeAll

* Fix ActionArchiveCache test
2023-12-14 17:33:34 +01:00

14 lines
505 B
PowerShell

Describe "Node.js" {
$binaries = @("node")
$module_commands = (Get-ToolsetContent).node_modules | ForEach-Object { $_.command }
$testCases = $binaries + $module_commands | ForEach-Object { @{NodeCommand = $_} }
It "<NodeCommand>" -TestCases $testCases {
"$NodeCommand --version" | Should -ReturnZeroExitCode
}
It "Node.js version should correspond to the version in the toolset" {
node --version | Should -BeLike "v$((Get-ToolsetContent).node.default).*"
}
}