Skip to content

Commit

Permalink
set NVM_NO_COLORS to --no-colors to disable color
Browse files Browse the repository at this point in the history
  • Loading branch information
ryenus committed Oct 18, 2024
1 parent 060adbd commit 3e15282
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/fast/Unit tests/nvm_print_versions
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ v21.1.0"


# nvm_print_versions should print all versions from nvm_remote_versions
OUTPUT="$(NVM_NO_COLORS=1 nvm_print_versions "$(nvm_remote_versions)" | sed -r 's/^[ \t]+//')"
OUTPUT="$(NVM_NO_COLORS='--no-colors' nvm_print_versions "$(nvm_remote_versions)" | sed -r 's/^[ \t]+//')"
EXPECTED_OUTPUT="v16.0.0
v16.20.2 * (LTS: Gallium)
v16.20.3 (Latest LTS: Gallium)
Expand All @@ -75,7 +75,7 @@ v21.1.0"


# versions lower than 18 should be filtered out, but v16.20.2 should be kept since it's installed
OUTPUT="$(NVM_NO_COLORS=1 NVM_MIN=v18 nvm_print_versions "$(nvm_remote_versions)" | sed -r 's/^[ \t]+//')"
OUTPUT="$(NVM_NO_COLORS='--no-colors' NVM_MIN=v18 nvm_print_versions "$(nvm_remote_versions)" | sed -r 's/^[ \t]+//')"
EXPECTED_OUTPUT="v16.20.2 * (LTS: Gallium)
v16.20.3 (Latest LTS: Gallium)
v18.0.0
Expand All @@ -94,7 +94,7 @@ v21.1.0"


# versions lower than 19 should be filtered out
OUTPUT="$(NVM_NO_COLORS=1 NVM_MIN=19 nvm_print_versions "$(nvm_remote_versions)" | sed -r 's/^[ \t]+//')"
OUTPUT="$(NVM_NO_COLORS='--no-colors' NVM_MIN=19 nvm_print_versions "$(nvm_remote_versions)" | sed -r 's/^[ \t]+//')"
EXPECTED_OUTPUT="v16.20.2 * (LTS: Gallium)
v16.20.3 (Latest LTS: Gallium)
-> v18.20.3 * (Latest LTS: Hydrogen)
Expand All @@ -110,7 +110,7 @@ v21.1.0"


# versions lower than 20.1 should be filtered out, so v20.0.0 is out
OUTPUT="$(NVM_NO_COLORS=1 NVM_MIN=v20.1 nvm_print_versions "$(nvm_remote_versions)" | sed -r 's/^[ \t]+//')"
OUTPUT="$(NVM_NO_COLORS='--no-colors' NVM_MIN=v20.1 nvm_print_versions "$(nvm_remote_versions)" | sed -r 's/^[ \t]+//')"
EXPECTED_OUTPUT="v16.20.2 * (LTS: Gallium)
v16.20.3 (Latest LTS: Gallium)
-> v18.20.3 * (Latest LTS: Hydrogen)
Expand All @@ -132,7 +132,7 @@ nvm_ls_current() {
echo "v16.20.2"
}

OUTPUT="$(NVM_NO_COLORS=1 NVM_MIN=20.1 nvm_print_versions "$(nvm_remote_versions)" | sed -r 's/^[ \t]+//')"
OUTPUT="$(NVM_NO_COLORS='--no-colors' NVM_MIN=20.1 nvm_print_versions "$(nvm_remote_versions)" | sed -r 's/^[ \t]+//')"
EXPECTED_OUTPUT="-> v16.20.2 * (LTS: Gallium)
v16.20.3 (Latest LTS: Gallium)
v20.8.1
Expand Down

0 comments on commit 3e15282

Please sign in to comment.