Ensure nvm_version node and nvm_version node- report the latest stable node version.

This commit is contained in:
Jordan Harband
2015-01-19 10:05:36 -08:00
parent 247bd310ef
commit f1f11e3b7a
2 changed files with 7 additions and 1 deletions

View File

@@ -29,8 +29,9 @@ nvm_ls() {
echo "line 2"
echo "pattern: $1"
}
[ "_$(nvm_version foo)" = "_pattern: foo" ] || die '"nvm_version foo" did not pass the pattern to "nvm_ls", or return the last line'
[ "_$(nvm_version node)" = "_pattern: stable" ] || die '"nvm_version node" did not pass "stable" to "nvm_ls"'
[ "_$(nvm_version node-)" = "_pattern: stable" ] || die '"nvm_version node-" did not pass "stable" to "nvm_ls"'
nvm_ls() { echo "N/A"; }
OUTPUT="$(nvm_version foo)"