Making sure this test passes whether a system node is installed or not.

master
Jordan Harband 2015-04-04 23:49:43 -07:00
parent a1a8e5a51b
commit 82393f5b36
1 changed files with 6 additions and 1 deletions

View File

@ -10,7 +10,12 @@ die () { echo $@ ; cleanup ; exit 1; }
return_zero () { return 0; }
[ "$(nvm deactivate > /dev/null 2>&1 ; nvm_ls_current)" = "system" ] || die 'when deactivated, did not return "system"'
if nvm_has_system_node || nvm_has_system_iojs; then
EXPECTED_SYSTEM_NODE="system"
else
EXPECTED_SYSTEM_NODE="none"
fi
[ "_$(nvm deactivate > /dev/null 2>&1 ; nvm_ls_current)" = "_$EXPECTED_SYSTEM_NODE" ] || die "when deactivated, did not return $EXPECTED_SYSTEM_NODE"
rm -rf "$TEST_DIR"
mkdir "$TEST_DIR"