Skip to content

Commit

Permalink
Add a test to use-on-cd when .node-version is found (#78)
Browse files Browse the repository at this point in the history
Add test that verifies #77
  • Loading branch information
Schniz authored Mar 5, 2019
1 parent 56dd92d commit 3ccca15
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions feature_tests/use_on_cd/nvmrc/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8.11.3
31 changes: 28 additions & 3 deletions feature_tests/use_on_cd/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ if hash zsh 2>/dev/null; then
exit 1
fi
cd app
cd nvmrc
NODE_VERSION=$(node -v)
if [ "$NODE_VERSION" != "v8.11.3" ]; then
echo "Failed: Node version ($NODE_VERSION) is not v8.11.3"
exit 1
fi
fnm use 6.11.3
cd ../dot_node_version
NODE_VERSION=$(node -v)
if [ "$NODE_VERSION" != "v8.11.3" ]; then
Expand All @@ -51,7 +60,16 @@ if hash fish 2>/dev/null; then
exit 1
end
cd app
cd nvmrc
set NODE_VERSION (node -v)
if test "$NODE_VERSION" != "v8.11.3"
echo "Failed: Node version ($NODE_VERSION) is not v8.11.3"
exit 1
end
fnm use 6.11.3
cd ../dot_node_version
set NODE_VERSION (node -v)
if test "$NODE_VERSION" != "v8.11.3"
Expand All @@ -73,7 +91,14 @@ bash -c '
echo "Failed: Node version ($NODE_VERSION) is not v6.11.3"
exit 1
fi
cd app
cd nvmrc
NODE_VERSION=$(node -v)
if [ "$NODE_VERSION" != "v8.11.3" ]; then
echo "Failed: Node version ($NODE_VERSION) is not v8.11.3"
exit 1
fi
fnm use 6.11.3
cd ../dot_node_version
NODE_VERSION=$(node -v)
if [ "$NODE_VERSION" != "v8.11.3" ]; then
echo "Failed: Node version ($NODE_VERSION) is not v8.11.3"
Expand Down

0 comments on commit 3ccca15

Please sign in to comment.