Skip to content

Commit abda08e

Browse files
committed
set NVM_NO_COLORS to --no-colors to disable color
1 parent 6c2bf69 commit abda08e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/fast/Unit tests/nvm_print_versions

+5-5
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ v21.1.0"
5353

5454

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

7676

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

9595

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

111111

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

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

0 commit comments

Comments
 (0)