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