[Tests] add `nvm run --lts` tests.

Jordan Harband 2016-07-18 00:35:01 -07:00
parent 58a82a1d31
commit 876d117376
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
3 changed files with 21 additions and 0 deletions

View File

@ -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}<"

View File

@ -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

View File

@ -1,8 +1,11 @@
#!/bin/sh
. ../../../nvm.sh
nvm deactivate
nvm uninstall v0.10.7
nvm uninstall --lts=argon
nvm uninstall --lts
rm .nvmrc