[Tests] use -ex option during tests when possible

Relates to #1130
This commit is contained in:
Jordan Harband
2016-07-07 00:00:59 -07:00
parent 186eb8838d
commit ecbd7d4572
21 changed files with 115 additions and 40 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/sh
set -ex
mkdir -p ../../v0.2.3
die () { echo $@ ; exit 1; }
@@ -7,6 +9,7 @@ die () { echo $@ ; exit 1; }
[ `expr $PATH : ".*v0.2.3/.*/bin"` = 0 ] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2
. ../../nvm.sh
nvm use --delete-prefix v0.2.3 || die "Failed to activate v0.2.3"
[ `expr "$PATH" : ".*v0.2.3/.*/bin"` != 0 ] || die "PATH not set up properly"
[ `expr "$NODE_PATH" : ".*v0.2.3/.*/lib/node_modules"` = 0 ] || die "NODE_PATH should not contain (npm root -g)"