Skip to content

Commit 46ca42f

Browse files
committed
[Tests] nvm install --reinstall-packages-from: mock the remote version instead of fetching it
1 parent 52a1e55 commit 46ca42f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎test/fast/Running 'nvm install' with '--reinstall-packages-from' requires a valid version‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -ex
55
die () { echo "$@" ; cleanup ; exit 1; }
66
cleanup () {
77
rm -rf "${NVM_DIR}/v0.10.4"
8+
unset -f nvm_remote_version
89
}
910

1011
export NVM_DIR="$(cd ../.. && pwd)"
@@ -13,6 +14,8 @@ export NVM_DIR="$(cd ../.. && pwd)"
1314
\. ../../nvm.sh
1415
\. ../common.sh
1516

17+
nvm_remote_version() { nvm_echo "${1-}"; }
18+
1619
make_fake_node v0.10.4
1720

1821
nvm deactivate >/dev/null 2>&1

0 commit comments

Comments
 (0)