[Tests] use rimraf over `rmdir` in teardowns

- fix test 'Running "nvm ls" should display all installed versions.': only expect versions created by this test, but no versions created by other tests
Christopher Sahnwaldt 2019-02-27 10:50:59 +01:00 committed by Jordan Harband
parent 43402df896
commit a1abfd1fe4
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
3 changed files with 20 additions and 27 deletions

View File

@ -1,3 +1,3 @@
rmdir ../../../v0.0.2 >/dev/null 2>&1 rm -rf ../../../v0.0.2
rmdir ../../../v0.0.20 >/dev/null 2>&1 rm -rf ../../../v0.0.20
rmdir ../../../v0.12.0 >/dev/null 2>&1 rm -rf ../../../v0.12.0

View File

@ -28,21 +28,15 @@ nvm ls | grep iojs-v0.1.2 >/dev/null || die "iojs-v0.1.2 not found in: $(nvm ls)
OUTPUT="$(nvm_ls)" OUTPUT="$(nvm_ls)"
EXPECTED_OUTPUT="v0.0.1 EXPECTED_OUTPUT="v0.0.1
v0.0.2
v0.0.3 v0.0.3
v0.0.9 v0.0.9
v0.0.20
iojs-v0.1.2 iojs-v0.1.2
v0.1.3
v0.1.4
v0.2.3
v0.3.1 v0.3.1
v0.3.3 v0.3.3
v0.3.9 v0.3.9
iojs-v0.10.2 iojs-v0.10.2
v0.12.9 v0.12.9
v0.12.87 v0.12.87"
v0.20.3"
if nvm_has_system_node || nvm_has_system_iojs; then if nvm_has_system_node || nvm_has_system_iojs; then
EXPECTED_OUTPUT="${EXPECTED_OUTPUT} EXPECTED_OUTPUT="${EXPECTED_OUTPUT}
system" system"

View File

@ -1,17 +1,16 @@
rmdir ../../../v0.0.1 >/dev/null 2>&1 rm -rf ../../../v0.0.1
rmdir ../../../v0.0.2 >/dev/null 2>&1 rm -rf ../../../v0.0.2
rmdir ../../../v0.0.3 >/dev/null 2>&1 rm -rf ../../../v0.0.3
rmdir ../../../v0.0.9 >/dev/null 2>&1 rm -rf ../../../v0.0.9
rmdir ../../../v0.0.20 >/dev/null 2>&1 rm -rf ../../../v0.0.20
rmdir ../../../v0.1.2 >/dev/null 2>&1 rm -rf ../../../v0.1.2
rmdir ../../../v0.1.3 >/dev/null 2>&1 rm -rf ../../../v0.1.3
rmdir ../../../v0.1.4 >/dev/null 2>&1 rm -rf ../../../v0.1.4
rmdir ../../../v0.2.3 >/dev/null 2>&1 rm -rf ../../../v0.2.3
rmdir ../../../v0.3.1 >/dev/null 2>&1 rm -rf ../../../v0.3.1
rmdir ../../../v0.3.3 >/dev/null 2>&1 rm -rf ../../../v0.3.3
rmdir ../../../v0.3.9 >/dev/null 2>&1 rm -rf ../../../v0.3.9
rmdir ../../../v0.20.3 >/dev/null 2>&1 rm -rf ../../../v0.20.3
rmdir ../../../versions >/dev/null 2>&1 rm -rf ../../../versions
unalias nvm_has_system_node >/dev/null 2>&1 rm -f ../../../alias/stable
rm -f ../../../alias/stable >/dev/null 2>&1 rm -f ../../../alias/unstable
rm -f ../../../alias/unstable >/dev/null 2>&1