diff options
author | Chocobozzz <me@florianbigard.com> | 2019-10-21 16:24:06 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-10-21 16:24:06 +0200 |
commit | 4c8ef0ec684f5dd1856ec751420b1e85369fd1bf (patch) | |
tree | bb0bb0e557053b3d889090d928bdda2b34c0b1f2 | |
parent | e199856bb79868ba4c027cf4a26ff2bd909b3fd4 (diff) | |
download | PeerTube-4c8ef0ec684f5dd1856ec751420b1e85369fd1bf.tar.gz PeerTube-4c8ef0ec684f5dd1856ec751420b1e85369fd1bf.tar.zst PeerTube-4c8ef0ec684f5dd1856ec751420b1e85369fd1bf.zip |
Add tsconfig-paths registration to mocha
-rwxr-xr-x | scripts/ci.sh | 4 | ||||
-rwxr-xr-x | scripts/test.sh | 2 | ||||
-rw-r--r-- | server/tests/api/ci-1.sh | 2 | ||||
-rw-r--r-- | server/tests/api/ci-2.sh | 5 | ||||
-rw-r--r-- | server/tests/api/ci-3.sh | 2 | ||||
-rw-r--r-- | server/tests/api/ci-4.sh | 5 |
6 files changed, 11 insertions, 9 deletions
diff --git a/scripts/ci.sh b/scripts/ci.sh index 1819f73dd..c023ddf98 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh | |||
@@ -11,7 +11,7 @@ killall -q peertube || true | |||
11 | 11 | ||
12 | if [ "$1" = "misc" ]; then | 12 | if [ "$1" = "misc" ]; then |
13 | npm run build -- --light-fr | 13 | npm run build -- --light-fr |
14 | mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/client.ts \ | 14 | mocha --timeout 5000 --exit --require ts-node/register --require tsconfig-paths/register --bail server/tests/client.ts \ |
15 | server/tests/feeds/index.ts \ | 15 | server/tests/feeds/index.ts \ |
16 | server/tests/misc-endpoints.ts \ | 16 | server/tests/misc-endpoints.ts \ |
17 | server/tests/helpers/index.ts \ | 17 | server/tests/helpers/index.ts \ |
@@ -19,7 +19,7 @@ if [ "$1" = "misc" ]; then | |||
19 | elif [ "$1" = "cli" ]; then | 19 | elif [ "$1" = "cli" ]; then |
20 | npm run build:server | 20 | npm run build:server |
21 | CC=gcc-4.9 CXX=g++-4.9 npm run setup:cli | 21 | CC=gcc-4.9 CXX=g++-4.9 npm run setup:cli |
22 | mocha --timeout 5000 --exit --require ts-node/register --bail server/tests/cli/index.ts | 22 | mocha --timeout 5000 --exit --require ts-node/register --require tsconfig-paths/register --bail server/tests/cli/index.ts |
23 | elif [ "$1" = "api-1" ]; then | 23 | elif [ "$1" = "api-1" ]; then |
24 | npm run build:server | 24 | npm run build:server |
25 | sh ./server/tests/api/ci-1.sh 2 | 25 | sh ./server/tests/api/ci-1.sh 2 |
diff --git a/scripts/test.sh b/scripts/test.sh index 1b6b29b66..8961ddd7e 100755 --- a/scripts/test.sh +++ b/scripts/test.sh | |||
@@ -7,4 +7,4 @@ npm run setup:cli | |||
7 | 7 | ||
8 | npm run ci -- lint | 8 | npm run ci -- lint |
9 | 9 | ||
10 | mocha --exit --require ts-node/register/type-check --bail server/tests/index.ts | 10 | mocha --exit --require ts-node/register/type-check --require tsconfig-paths/register --bail server/tests/index.ts |
diff --git a/server/tests/api/ci-1.sh b/server/tests/api/ci-1.sh index 90ffd568b..faa440785 100644 --- a/server/tests/api/ci-1.sh +++ b/server/tests/api/ci-1.sh | |||
@@ -6,5 +6,5 @@ checkParamFiles=$(find server/tests/api/check-params -type f | grep -v index.ts | |||
6 | notificationsFiles=$(find server/tests/api/notifications -type f | grep -v index.ts | xargs echo) | 6 | notificationsFiles=$(find server/tests/api/notifications -type f | grep -v index.ts | xargs echo) |
7 | searchFiles=$(find server/tests/api/search -type f | grep -v index.ts | xargs echo) | 7 | searchFiles=$(find server/tests/api/search -type f | grep -v index.ts | xargs echo) |
8 | 8 | ||
9 | MOCHA_PARALLEL=true npm run mocha -- --timeout 30000 --exit --require ts-node/register --bail \ | 9 | MOCHA_PARALLEL=true npm run mocha -- --timeout 30000 --exit --require ts-node/register --require tsconfig-paths/register --bail \ |
10 | $notificationsFiles $searchFiles $checkParamFiles | 10 | $notificationsFiles $searchFiles $checkParamFiles |
diff --git a/server/tests/api/ci-2.sh b/server/tests/api/ci-2.sh index 16ab585e9..52c839d12 100644 --- a/server/tests/api/ci-2.sh +++ b/server/tests/api/ci-2.sh | |||
@@ -5,5 +5,6 @@ set -eu | |||
5 | serverFiles=$(find server/tests/api/server -type f | grep -v index.ts | xargs echo) | 5 | serverFiles=$(find server/tests/api/server -type f | grep -v index.ts | xargs echo) |
6 | usersFiles=$(find server/tests/api/users -type f | grep -v index.ts | xargs echo) | 6 | usersFiles=$(find server/tests/api/users -type f | grep -v index.ts | xargs echo) |
7 | 7 | ||
8 | MOCHA_PARALLEL=true npm run mocha-parallel-tests -- --max-parallel $1 --timeout 30000 --exit --require ts-node/register --bail \ | 8 | MOCHA_PARALLEL=true npm run mocha-parallel-tests -- --max-parallel $1 --timeout 30000 --exit \ |
9 | $serverFiles $usersFiles | 9 | --require ts-node/register --require tsconfig-paths/register --bail \ |
10 | $serverFiles $usersFiles | ||
diff --git a/server/tests/api/ci-3.sh b/server/tests/api/ci-3.sh index 7aeea7fcb..ae5bb735a 100644 --- a/server/tests/api/ci-3.sh +++ b/server/tests/api/ci-3.sh | |||
@@ -4,5 +4,5 @@ set -eu | |||
4 | 4 | ||
5 | videosFiles=$(find server/tests/api/videos -type f | grep -v index.ts | xargs echo) | 5 | videosFiles=$(find server/tests/api/videos -type f | grep -v index.ts | xargs echo) |
6 | 6 | ||
7 | npm run mocha -- --timeout 30000 --exit --require ts-node/register --bail \ | 7 | npm run mocha -- --timeout 30000 --exit --require ts-node/register --require tsconfig-paths/register --bail \ |
8 | $videosFiles | 8 | $videosFiles |
diff --git a/server/tests/api/ci-4.sh b/server/tests/api/ci-4.sh index 74809e1ad..22785cf33 100644 --- a/server/tests/api/ci-4.sh +++ b/server/tests/api/ci-4.sh | |||
@@ -5,5 +5,6 @@ set -eu | |||
5 | redundancyFiles=$(find server/tests/api/redundancy -type f | grep -v index.ts | xargs echo) | 5 | redundancyFiles=$(find server/tests/api/redundancy -type f | grep -v index.ts | xargs echo) |
6 | activitypubFiles=$(find server/tests/api/activitypub -type f | grep -v index.ts | xargs echo) | 6 | activitypubFiles=$(find server/tests/api/activitypub -type f | grep -v index.ts | xargs echo) |
7 | 7 | ||
8 | MOCHA_PARALLEL=true npm run mocha-parallel-tests -- --max-parallel $1 --timeout 30000 --exit --require ts-node/register --bail \ | 8 | MOCHA_PARALLEL=true npm run mocha-parallel-tests -- --max-parallel $1 --timeout 30000 --exit \ |
9 | $redundancyFiles $activitypubFiles | 9 | --require ts-node/register --require tsconfig-paths/register --bail \ |
10 | $redundancyFiles $activitypubFiles | ||