From d4c800cfa64b54af0d9617d6793a7834eb76a652 Mon Sep 17 00:00:00 2001 From: Alexander Bezzubov Date: Wed, 24 Dec 2014 13:09:17 +0900 Subject: [PATCH] Reconsiling test wrapper with #2, adding URL argument --- spec/acceptance_test => test_sepc | 10 ++++++++++ 1 file changed, 10 insertions(+) rename spec/acceptance_test => test_sepc (75%) diff --git a/spec/acceptance_test b/test_sepc similarity index 75% rename from spec/acceptance_test rename to test_sepc index ab28817..b5c29c4 100755 --- a/spec/acceptance_test +++ b/test_sepc @@ -4,10 +4,20 @@ #TODO(alex): check if node\npm availabe, fail gracefully if not +cd ./spec + if [[ ! -d 'node_modules' ]]; then echo "Installing dependencies though NPM" npm install fi +if [[ "$#" -ne 1 ]]; then + url="http://localhost:8080" +else + url="$1" +fi + echo "Runing tests" npm test "$@" + +cd -