Browse Source

Test nvm upgrade

yarn-lazy
Luke Childs 8 years ago
parent
commit
dd55eb6048
  1. 23
      tests/wrapper commands/nvm upgrade

23
tests/wrapper commands/nvm upgrade

@ -0,0 +1,23 @@
source ../common.sh
# Version to revert nvm to
revert_version=v0.32.0
# Load zsh-nvm
load_zsh_nvm
# Save latest version
latest_version=$(nvm --version)
# Roll back to an old version
echo "$revert_version" > "$ZSH_NVM_DIR/previous_version"
nvm revert
# Check rollback worked
[[ "v$(nvm --version)" == "$revert_version" ]] || die "Couldn't rollback nvm version"
# Attempt to upgrade
nvm upgrade
# Check upgrade worked
[[ "$(nvm --version)" == "$latest_version" ]] || die "Couldn't upgrade nvm to latest version ($latest_version)"
Loading…
Cancel
Save