From 1b6b4757727da56061da0e17e7479f6062bb139f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 31 Oct 2017 17:33:23 +0100 Subject: [PATCH] Build server files before test the api --- scripts/test.sh | 6 ++---- scripts/travis.sh | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 473445876..fbd62bff8 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,8 +1,6 @@ #!/bin/bash npm run build:server || exit -1 - -npm run travis -- client || exit -1 -npm run travis -- api || exit -1 -npm run travis -- cli || exit -1 npm run travis -- lint || exit -1 + +mocha --exit --require ts-node/register --bail server/tests/index.ts diff --git a/scripts/travis.sh b/scripts/travis.sh index e919f18a4..f6cdda463 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -5,14 +5,14 @@ if [ $# -eq 0 ]; then exit -1 fi -if [ "$1" = "build_then_client" ]; then +if [ "$1" = "client" ]; then npm run build mocha --exit --require ts-node/register --bail server/tests/client.ts -elif [ "$1" = "client" ]; then - mocha --exit --require ts-node/register --bail server/tests/client.ts elif [ "$1" = "api" ]; then + npm run build:server mocha --exit --require ts-node/register --bail server/tests/api/index.ts elif [ "$1" = "cli" ]; then + npm run build:server mocha --exit --require ts-node/register --bail server/tests/cli/index.ts elif [ "$1" = "lint" ]; then cd client || exit -1 -- 2.25.1