]>
Commit | Line | Data |
---|---|---|
18530063 C |
1 | #!/bin/bash |
2 | ||
3 | if [ $# -eq 0 ]; then | |
4 | echo "Need test suite argument." | |
5 | exit -1 | |
6 | fi | |
7 | ||
98ec8b8e | 8 | if [ "$1" = "misc" ]; then |
18530063 | 9 | npm run build |
98ec8b8e | 10 | mocha --exit --require ts-node/register --bail server/tests/client.ts server/tests/activitypub.ts |
18530063 | 11 | elif [ "$1" = "api" ]; then |
1b6b4757 | 12 | npm run build:server |
18530063 C |
13 | mocha --exit --require ts-node/register --bail server/tests/api/index.ts |
14 | elif [ "$1" = "cli" ]; then | |
1b6b4757 | 15 | npm run build:server |
18530063 | 16 | mocha --exit --require ts-node/register --bail server/tests/cli/index.ts |
15f25480 C |
17 | elif [ "$1" = "api-fast" ]; then |
18 | npm run build:server | |
19 | mocha --exit --require ts-node/register --bail server/tests/api/index-fast.ts | |
20 | elif [ "$1" = "api-slow" ]; then | |
21 | npm run build:server | |
22 | mocha --exit --require ts-node/register --bail server/tests/api/index-slow.ts | |
18530063 C |
23 | elif [ "$1" = "lint" ]; then |
24 | cd client || exit -1 | |
25 | npm run lint || exit -1 | |
26 | ||
27 | cd .. || exit -1 | |
28 | npm run tslint -- --type-check --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" || exit -1 | |
29 | fi |