2020-07-17 15:29:03 +07:00
|
|
|
Describe "Node.JS" {
|
|
|
|
|
Context "Basic modules"{
|
|
|
|
|
It "<ToolName> " -TestCases @(
|
|
|
|
|
@{ ToolName = "node" }
|
|
|
|
|
@{ ToolName = "npm" }
|
|
|
|
|
) {
|
2021-08-01 15:10:59 +03:00
|
|
|
"$ToolName --version" | Should -ReturnZeroExitCode
|
2020-07-17 15:29:03 +07:00
|
|
|
}
|
|
|
|
|
}
|
2021-08-01 15:10:59 +03:00
|
|
|
|
|
|
|
|
$globalNpmPackages = (Get-ToolsetContent).npm.global_packages
|
|
|
|
|
$globalNpmPackagesWithTests = $globalNpmPackages | Where-Object { $_.test } | ForEach-Object { @{ Name = $_.name; Test = $_.test } }
|
|
|
|
|
|
2020-07-17 15:29:03 +07:00
|
|
|
Context "Global NPM Packages" {
|
2021-08-01 15:10:59 +03:00
|
|
|
It "<Name>" -TestCases $globalNpmPackagesWithTests {
|
|
|
|
|
$Test | Should -ReturnZeroExitCode
|
2020-07-17 15:29:03 +07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|