Skip to content
Myr

[Tests] force the NVM_DIR to the expected location, for tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jordan Harband · committed by Jordan Harband · parent fe06825 · Browse files · 7 files+14 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

7 files+14 added−0 removed

  • tests:+14 added−0 removed

7 files+14 added−0 removed

modified:test/fast/Aliases/setup+2 added
1#!/bin/sh23export NVM_DIR="$(cd ../../.. && pwd)"45\. ../../../nvm.sh6\. ../../common.sh78for i in $(seq 1 10)
8 unmodified lines
modified:test/fast/Listing versions/Running 'nvm ls' should not show a trailing slash+2 added
1#!/bin/zsh23export NVM_DIR="$(cd ../../.. && pwd)"45\. ../../../nvm.sh6\. ../../common.sh78if type setopt >/dev/null 2>&1; then setopt local_options markdirs; fi
34 unmodified lines
modified:test/fast/Running 'nvm alias' should create a file in the alias directory+2 added
1#!/bin/sh23set -ex45export NVM_DIR="$(cd ../.. && pwd)"67\. ../../nvm.sh89nvm alias test v0.1.210
1 unmodified line
modified:test/fast/Running 'nvm current' should display current nvm environment+2 added
2 unmodified lines
3set -ex45die () { echo "$@" ; exit 1; }67export NVM_DIR="$(cd ../.. && pwd)"89\. ../../nvm.sh1011nvm deactivate 2>&112
1 unmodified line
modified:test/fast/Running 'nvm deactivate' should unset the nvm environment variables+2 added
2 unmodified lines
3set -ex45die () { echo "$@" ; exit 1; }67export NVM_DIR="$(cd ../.. && pwd)"89\. ../../nvm.sh10\. ../common.sh1112make_fake_node v0.2.3
13 unmodified lines
modified:test/fast/Running 'nvm install' with '--reinstall-packages-from' requires a valid version+2 added
5 unmodified lines
6cleanup () {7 rm -rf "${NVM_DIR}/v0.10.4"8}910export NVM_DIR="$(cd ../.. && pwd)"1112\. ../../nvm.sh13\. ../common.sh1415make_fake_node v0.10.4
44 unmodified lines
modified:test/fast/Running 'nvm install' with an invalid version fails nicely+2 added
2 unmodified lines
3set -ex45die () { echo "$@" ; exit 1; }67export NVM_DIR="$(cd ../.. && pwd)"89\. ../../nvm.sh1011set +ex # needed for stderr12OUTPUT="$(nvm install invalid.invalid 2>&1)"
3 unmodified lines