Files
runner-images/images/win/scripts/Tests/Node.Tests.ps1
T

19 lines
615 B
PowerShell
Raw Normal View History

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
}
}
}