diff --git a/images/macos/scripts/build/install-nvm.sh b/images/macos/scripts/build/install-nvm.sh deleted file mode 100644 index 35731cf94..000000000 --- a/images/macos/scripts/build/install-nvm.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -e -o pipefail -################################################################################ -## File: install-nvm.sh -## Desc: Install node version manager -################################################################################ - -source ~/utils/utils.sh - -[[ -n $API_PAT ]] && authString=(-H "Authorization: token ${API_PAT}") - -nvm_version=$(get_toolset_value '.node.nvm_installer') -if [[ -z $nvm_version || "$nvm_version" == "latest" ]]; then - nvm_version=$(curl "${authString[@]}" -fsSL https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name') -fi - -if [[ $nvm_version != "v*" ]]; then - nvm_version="v${nvm_version}" -fi - -nvm_installer_path=$(download_with_retry "https://raw.githubusercontent.com/nvm-sh/nvm/$nvm_version/install.sh") - -if bash $nvm_installer_path; then - source ~/.bashrc - nvm --version - for version in $(get_toolset_value '.node.nvm_versions[]'); do - nvm install "v${version}" - done - - # set system node as default - nvm alias default system - echo "Node version manager has been installed successfully" -else - echo "Node version manager installation failed" -fi - -invoke_tests "Node" "nvm" diff --git a/images/macos/scripts/tests/Node.Tests.ps1 b/images/macos/scripts/tests/Node.Tests.ps1 index a48008ef3..ebd432fc0 100644 --- a/images/macos/scripts/tests/Node.Tests.ps1 +++ b/images/macos/scripts/tests/Node.Tests.ps1 @@ -21,31 +21,6 @@ Describe "Node.js" { } } -Describe "nvm" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) { - BeforeAll { - $nvmPath = Join-Path $env:HOME ".nvm" "nvm.sh" - $nvmInitCommand = ". $nvmPath > /dev/null 2>&1 || true" - } - - It "nvm is installed" { - $nvmPath | Should -Exist - "$nvmInitCommand && nvm --version" | Should -ReturnZeroExitCode - } - - Context "nvm versions" { - [array]$nvmVersions = (Get-ToolsetContent).node.nvm_versions - $testCases = $nvmVersions | ForEach-Object { @{NvmVersion = $_} } - - It "" -TestCases $testCases { - param ( - [string] $NvmVersion - ) - - "$nvmInitCommand && nvm ls $($NvmVersion)" | Should -ReturnZeroExitCode - } - } -} - Describe "Global NPM Packages" { $globalNpmPackages = (Get-ToolsetContent).npm.global_packages $globalNpmPackagesWithTests = $globalNpmPackages | Where-Object { $_.test } | ForEach-Object { @{ Name = $_.name; Test = $_.test } }