[Tests] ensure things that care about colors run in a terminal

This commit is contained in:
Jordan Harband
2024-07-28 21:00:48 -07:00
parent ff1257e8e3
commit d2f31a21f3
9 changed files with 62 additions and 55 deletions

View File

@@ -5,7 +5,7 @@
die () { echo "$@" ; exit 1; }
NVM_ALIAS_OUTPUT="$(nvm alias | strip_colors)"
NVM_ALIAS_OUTPUT="$(run_in_terminal nvm alias | strip_colors)"
echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-1 -> 0.0.1 (-> v0.0.1)' \
|| die "did not find test-stable-1 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-2 -> 0.0.2 (-> v0.0.2)' \