Skip to content

Commit

Permalink
Making sure this test passes whether a system node is installed or not.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Apr 5, 2015
1 parent a1a8e5a commit 82393f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/fast/Unit tests/nvm_ls_current
Expand Up @@ -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"
Expand Down

0 comments on commit 82393f5

Please sign in to comment.