-
Notifications
You must be signed in to change notification settings - Fork 98
/
test.sh
executable file
·39 lines (31 loc) · 941 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# bash script mode
set -eo pipefail
function startfold {
if [ -n "$TRAVIS_BUILD_NUMBER" ]; then
echo $1
echo -en "travis_fold:start:$2\r"
fi
}
function endfold {
if [ -n "$TRAVIS_BUILD_NUMBER" ]; then
echo -en "travis_fold:end:$1\r"
fi
}
# run karma (client unit) tests
startfold "Running Client Unit Tests..." "test-client-unit";
./node_modules/.bin/karma start --single-run --no-auto-watch --concurrency 1 karma.conf.js
endfold "test-client-unit" ;
# run integration tests
startfold "Running Integration Tests..." "test-integration";
./sh/integration-tests.sh
endfold "test-integration" ;
#run server-unit test
startfold "Running server Unit Tests ......" "server-unit"
./node_modules/.bin/mocha --recursive --exit test/server-unit
endfold "server-unit" ;
# run end to end tests
startfold "Running Client End to End Tests..." "test-end-to-end";
./sh/test-ends.sh
endfold "test-end-to-end" ;
exit 0;