[Tests] add `nvm run --lts` tests.
parent
58a82a1d31
commit
876d117376
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
die () { echo $@ ; exit 1; }
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
||||
OUTPUT="$(nvm run --silent --lts --version)"
|
||||
EXPECTED_OUTPUT="$(nvm_match_version 'lts/*')"
|
||||
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm run --lts\` failed to run with the correct version; expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
|
||||
|
||||
OUTPUT="$(nvm run --silent --lts=argon --version)"
|
||||
EXPECTED_OUTPUT="$(nvm_match_version 'lts/argon')"
|
||||
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm run --lts=argon\` failed to run with the correct version; expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
|
|
@ -1,7 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
||||
nvm install 0.10.7
|
||||
nvm install --lts=argon
|
||||
nvm install --lts
|
||||
|
||||
if [ -f ".nvmrc" ]; then
|
||||
mv .nvmrc .nvmrc.bak
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
||||
nvm deactivate
|
||||
nvm uninstall v0.10.7
|
||||
nvm uninstall --lts=argon
|
||||
nvm uninstall --lts
|
||||
|
||||
rm .nvmrc
|
||||
|
||||
|
|
Loading…
Reference in New Issue