From c24aac6bc73033195c37d81cf2b7449c9b54712c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Jun 2020 13:38:20 +0200 Subject: [PATCH] Fix tests --- scripts/ci.sh | 2 +- server/tests/api/ci-4.sh | 2 +- server/typings/{express.d.ts => express/index.d.ts} | 10 +++++----- tsconfig.json | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) rename server/typings/{express.d.ts => express/index.d.ts} (91%) diff --git a/scripts/ci.sh b/scripts/ci.sh index 7854d88fc..f75e457fd 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -13,7 +13,7 @@ perl -0777 -i -pe 's#proxy:(\n\s+)enabled: false\n\s+url: ""#proxy:$1enabled: t if [ "$1" = "misc" ]; then npm run build -- --light - mocha --timeout 5000 --exit --require ts-node/register --require tsconfig-paths/register --bail server/tests/client.ts \ + mocha --timeout 5000 --exit --require ts-node/register --files --require tsconfig-paths/register --bail server/tests/client.ts \ server/tests/feeds/index.ts \ server/tests/misc-endpoints.ts \ server/tests/helpers/index.ts \ diff --git a/server/tests/api/ci-4.sh b/server/tests/api/ci-4.sh index 7d83cbdfc..e71b9b154 100644 --- a/server/tests/api/ci-4.sh +++ b/server/tests/api/ci-4.sh @@ -6,5 +6,5 @@ redundancyFiles=$(find server/tests/api/redundancy -type f | grep -v index.ts | activitypubFiles=$(find server/tests/api/activitypub -type f | grep -v index.ts | xargs echo) MOCHA_PARALLEL=true npm run mocha -- --parallel --jobs $1 --timeout 30000 --exit \ - --require ts-node/register --require tsconfig-paths/register --bail \ + --require ts-node/register --files --require tsconfig-paths/register --bail \ $redundancyFiles $activitypubFiles diff --git a/server/typings/express.d.ts b/server/typings/express/index.d.ts similarity index 91% rename from server/typings/express.d.ts rename to server/typings/express/index.d.ts index 451bf9103..ad3212340 100644 --- a/server/typings/express.d.ts +++ b/server/typings/express/index.d.ts @@ -1,4 +1,4 @@ -import { RegisteredPlugin } from '../lib/plugins/plugin-manager' +import { RegisteredPlugin } from '../../lib/plugins/plugin-manager' import { MAccountDefault, MActorAccountChannelId, @@ -18,15 +18,15 @@ import { MVideoShareActor, MVideoThumbnail, MVideoWithRights -} from '../types/models' -import { MVideoPlaylistFull, MVideoPlaylistFullSummary } from '../types/models/video/video-playlist' +} from '../../types/models' +import { MVideoPlaylistFull, MVideoPlaylistFullSummary } from '../../types/models/video/video-playlist' import { MVideoImportDefault } from '@server/types/models/video/video-import' import { MAccountBlocklist, MActorUrl, MStreamingPlaylist, MVideoFile, MVideoImmutable } from '@server/types/models' import { MVideoPlaylistElement, MVideoPlaylistElementVideoUrlPlaylistPrivacy } from '@server/types/models/video/video-playlist-element' import { MAccountVideoRateAccountVideo } from '@server/types/models/video/video-rate' -import { MVideoChangeOwnershipFull } from '../types/models/video/video-change-ownership' +import { MVideoChangeOwnershipFull } from '../../types/models/video/video-change-ownership' import { MPlugin, MServer } from '@server/types/models/server' -import { MServerBlocklist } from '../types/models/server/server-blocklist' +import { MServerBlocklist } from '../../types/models/server/server-blocklist' import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token' import { UserRole } from '@shared/models' import { RegisterServerAuthExternalOptions } from '@shared/models/plugins/register-server-auth.model' diff --git a/tsconfig.json b/tsconfig.json index d305722c4..aa129c1d9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -28,6 +28,7 @@ "@shared/*": [ "shared/*" ] } }, + "include": [ "." ], "exclude": [ "server/tools/", "node_modules", -- 2.25.1