Files
runner-images-sangeeth/images/win/scripts/Tests/Node.Tests.ps1
Maxim Lobanov 892ada55d5 [Windows] Docker, .NET Core and NPM improvements (#3811)
* improve InitializeVM script

* Update windows2019.json

* remove configs

* resolve comments

* resolve comments; fix order

* fix templates

* move Node.js packages to toolset

* dotnet warmup and merge docker scripts

* Update Node.Tests.ps1

* Update Install-Docker.ps1

* fix node.js tests

* fix npm package installation

* Update Install-NodeLts.ps1

* fix tests

* fix test
2021-08-01 15:10:59 +03:00

19 lines
615 B
PowerShell

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