diff --git a/test/slow/Running 'nvm-exec' should display required node version b/test/slow/Running 'nvm-exec' should display required node version index 53b149b..8c91cf7 100644 --- a/test/slow/Running 'nvm-exec' should display required node version +++ b/test/slow/Running 'nvm-exec' should display required node version @@ -1,8 +1,7 @@ -#!/bin/sh +#!/bin/bash -set -ex -die () { echo "$@" ; exit 1; } -\. ../../../nvm.sh +set -x +\. ../../nvm.sh NVM_TEST_VERSION=v9 @@ -12,5 +11,10 @@ NVM_TEST_VERSION=v9 # Write it to nvmrc echo "$NVM_TEST_VERSION" > .nvmrc +output="$(../../nvm-exec 2>&1)"; +expected='N/A: version "v9" is not yet installed. + +You need to run `nvm install v9` to install and use it. +No NODE_VERSION provided; no .nvmrc file found'; # Skip install, we want to test the error message -nvm-exec +diff <(echo "$expected") <(echo "$output")