aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-17 11:58:15 +0100
committerChocobozzz <me@florianbigard.com>2021-12-17 12:24:03 +0100
commitc55e3d7227fe1453869e309025996b9d75256d5d (patch)
tree08e9b0ca210d75c82c8606fef0852eca020e8e0e /server/tests/api/videos
parentbf54587a3e2ad9c2c186828f2a5682b91ee2cc00 (diff)
downloadPeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.gz
PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.zst
PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.zip
Move test functions outside extra-utils
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/audio-only.ts9
-rw-r--r--server/tests/api/videos/multiple-servers.ts15
-rw-r--r--server/tests/api/videos/resumable-upload.ts10
-rw-r--r--server/tests/api/videos/single-server.ts13
-rw-r--r--server/tests/api/videos/video-captions.ts5
-rw-r--r--server/tests/api/videos/video-channels.ts7
-rw-r--r--server/tests/api/videos/video-comments.ts11
-rw-r--r--server/tests/api/videos/video-create-transcoding.ts6
-rw-r--r--server/tests/api/videos/video-description.ts9
-rw-r--r--server/tests/api/videos/video-files.ts9
-rw-r--r--server/tests/api/videos/video-hls.ts11
-rw-r--r--server/tests/api/videos/video-imports.ts8
-rw-r--r--server/tests/api/videos/video-playlist-thumbnails.ts6
-rw-r--r--server/tests/api/videos/video-playlists.ts23
-rw-r--r--server/tests/api/videos/video-privacy.ts11
-rw-r--r--server/tests/api/videos/video-schedule-update.ts4
-rw-r--r--server/tests/api/videos/video-transcoder.ts18
-rw-r--r--server/tests/api/videos/videos-history.ts6
-rw-r--r--server/tests/api/videos/videos-overview.ts3
-rw-r--r--server/tests/api/videos/videos-views-cleaner.ts4
20 files changed, 86 insertions, 102 deletions
diff --git a/server/tests/api/videos/audio-only.ts b/server/tests/api/videos/audio-only.ts
index 4b27f2fbe..e58360ffe 100644
--- a/server/tests/api/videos/audio-only.ts
+++ b/server/tests/api/videos/audio-only.ts
@@ -3,7 +3,14 @@
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils' 5import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils'
6import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' 6import {
7 cleanupTests,
8 createMultipleServers,
9 doubleFollow,
10 PeerTubeServer,
11 setAccessTokensToServers,
12 waitJobs
13} from '@shared/server-commands'
7 14
8const expect = chai.expect 15const expect = chai.expect
9 16
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts
index cb83fa0f0..9fa03f1a9 100644
--- a/server/tests/api/videos/multiple-servers.ts
+++ b/server/tests/api/videos/multiple-servers.ts
@@ -4,23 +4,24 @@ import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import request from 'supertest' 5import request from 'supertest'
6import { 6import {
7 buildAbsoluteFixturePath,
8 checkTmpIsEmpty, 7 checkTmpIsEmpty,
9 checkVideoFilesWereRemoved, 8 checkVideoFilesWereRemoved,
9 completeVideoCheck,
10 dateIsValid,
11 saveVideoInServers,
12 testImage
13} from '@server/tests/shared'
14import { buildAbsoluteFixturePath, wait } from '@shared/core-utils'
15import { HttpStatusCode, VideoCommentThreadTree, VideoPrivacy } from '@shared/models'
16import {
10 cleanupTests, 17 cleanupTests,
11 createMultipleServers, 18 createMultipleServers,
12 dateIsValid,
13 doubleFollow, 19 doubleFollow,
14 PeerTubeServer, 20 PeerTubeServer,
15 saveVideoInServers,
16 setAccessTokensToServers, 21 setAccessTokensToServers,
17 testImage,
18 wait,
19 waitJobs, 22 waitJobs,
20 webtorrentAdd 23 webtorrentAdd
21} from '@shared/server-commands' 24} from '@shared/server-commands'
22import { HttpStatusCode, VideoCommentThreadTree, VideoPrivacy } from '@shared/models'
23import { completeVideoCheck } from '@server/tests/shared/video'
24 25
25const expect = chai.expect 26const expect = chai.expect
26 27
diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts
index 0842817dc..d6f4da630 100644
--- a/server/tests/api/videos/resumable-upload.ts
+++ b/server/tests/api/videos/resumable-upload.ts
@@ -4,15 +4,9 @@ import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { pathExists, readdir, stat } from 'fs-extra' 5import { pathExists, readdir, stat } from 'fs-extra'
6import { join } from 'path' 6import { join } from 'path'
7import { 7import { buildAbsoluteFixturePath } from '@shared/core-utils'
8 buildAbsoluteFixturePath,
9 cleanupTests,
10 createSingleServer,
11 PeerTubeServer,
12 setAccessTokensToServers,
13 setDefaultVideoChannel
14} from '@shared/server-commands'
15import { HttpStatusCode, VideoPrivacy } from '@shared/models' 8import { HttpStatusCode, VideoPrivacy } from '@shared/models'
9import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands'
16 10
17const expect = chai.expect 11const expect = chai.expect
18 12
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts
index e5e12dd19..28bf018c5 100644
--- a/server/tests/api/videos/single-server.ts
+++ b/server/tests/api/videos/single-server.ts
@@ -2,17 +2,10 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { 5import { checkVideoFilesWereRemoved, completeVideoCheck, testImage } from '@server/tests/shared'
6 checkVideoFilesWereRemoved, 6import { wait } from '@shared/core-utils'
7 cleanupTests,
8 createSingleServer,
9 PeerTubeServer,
10 setAccessTokensToServers,
11 testImage,
12 wait
13} from '@shared/server-commands'
14import { Video, VideoPrivacy } from '@shared/models' 7import { Video, VideoPrivacy } from '@shared/models'
15import { completeVideoCheck } from '@server/tests/shared/video' 8import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
16 9
17const expect = chai.expect 10const expect = chai.expect
18 11
diff --git a/server/tests/api/videos/video-captions.ts b/server/tests/api/videos/video-captions.ts
index 9f00312aa..b7f26c35f 100644
--- a/server/tests/api/videos/video-captions.ts
+++ b/server/tests/api/videos/video-captions.ts
@@ -2,15 +2,14 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { checkVideoFilesWereRemoved, testCaptionFile } from '@server/tests/shared'
6import { wait } from '@shared/core-utils'
5import { 7import {
6 checkVideoFilesWereRemoved,
7 cleanupTests, 8 cleanupTests,
8 createMultipleServers, 9 createMultipleServers,
9 doubleFollow, 10 doubleFollow,
10 PeerTubeServer, 11 PeerTubeServer,
11 setAccessTokensToServers, 12 setAccessTokensToServers,
12 testCaptionFile,
13 wait,
14 waitJobs 13 waitJobs
15} from '@shared/server-commands' 14} from '@shared/server-commands'
16 15
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts
index 2ac577a59..d435f3682 100644
--- a/server/tests/api/videos/video-channels.ts
+++ b/server/tests/api/videos/video-channels.ts
@@ -4,6 +4,9 @@ import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { basename } from 'path' 5import { basename } from 'path'
6import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants' 6import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants'
7import { testFileExistsOrNot, testImage } from '@server/tests/shared'
8import { wait } from '@shared/core-utils'
9import { User, VideoChannel } from '@shared/models'
7import { 10import {
8 cleanupTests, 11 cleanupTests,
9 createMultipleServers, 12 createMultipleServers,
@@ -11,12 +14,8 @@ import {
11 PeerTubeServer, 14 PeerTubeServer,
12 setAccessTokensToServers, 15 setAccessTokensToServers,
13 setDefaultVideoChannel, 16 setDefaultVideoChannel,
14 testFileExistsOrNot,
15 testImage,
16 wait,
17 waitJobs 17 waitJobs
18} from '@shared/server-commands' 18} from '@shared/server-commands'
19import { User, VideoChannel } from '@shared/models'
20 19
21const expect = chai.expect 20const expect = chai.expect
22 21
diff --git a/server/tests/api/videos/video-comments.ts b/server/tests/api/videos/video-comments.ts
index bb4f92a9b..2ae523970 100644
--- a/server/tests/api/videos/video-comments.ts
+++ b/server/tests/api/videos/video-comments.ts
@@ -2,15 +2,8 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { 5import { dateIsValid, testImage } from '@server/tests/shared'
6 cleanupTests, 6import { cleanupTests, CommentsCommand, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
7 CommentsCommand,
8 createSingleServer,
9 dateIsValid,
10 PeerTubeServer,
11 setAccessTokensToServers,
12 testImage
13} from '@shared/server-commands'
14 7
15const expect = chai.expect 8const expect = chai.expect
16 9
diff --git a/server/tests/api/videos/video-create-transcoding.ts b/server/tests/api/videos/video-create-transcoding.ts
index e81f54714..62a6bab0d 100644
--- a/server/tests/api/videos/video-create-transcoding.ts
+++ b/server/tests/api/videos/video-create-transcoding.ts
@@ -2,20 +2,20 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { expectStartWith } from '@server/tests/shared'
6import { areObjectStorageTestsDisabled } from '@shared/core-utils'
7import { HttpStatusCode, VideoDetails } from '@shared/models'
5import { 8import {
6 areObjectStorageTestsDisabled,
7 cleanupTests, 9 cleanupTests,
8 createMultipleServers, 10 createMultipleServers,
9 doubleFollow, 11 doubleFollow,
10 expectNoFailedTranscodingJob, 12 expectNoFailedTranscodingJob,
11 expectStartWith,
12 makeRawRequest, 13 makeRawRequest,
13 ObjectStorageCommand, 14 ObjectStorageCommand,
14 PeerTubeServer, 15 PeerTubeServer,
15 setAccessTokensToServers, 16 setAccessTokensToServers,
16 waitJobs 17 waitJobs
17} from '@shared/server-commands' 18} from '@shared/server-commands'
18import { HttpStatusCode, VideoDetails } from '@shared/models'
19 19
20const expect = chai.expect 20const expect = chai.expect
21 21
diff --git a/server/tests/api/videos/video-description.ts b/server/tests/api/videos/video-description.ts
index 23c55f728..20b20488f 100644
--- a/server/tests/api/videos/video-description.ts
+++ b/server/tests/api/videos/video-description.ts
@@ -2,7 +2,14 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' 5import {
6 cleanupTests,
7 createMultipleServers,
8 doubleFollow,
9 PeerTubeServer,
10 setAccessTokensToServers,
11 waitJobs
12} from '@shared/server-commands'
6 13
7const expect = chai.expect 14const expect = chai.expect
8 15
diff --git a/server/tests/api/videos/video-files.ts b/server/tests/api/videos/video-files.ts
index 0b5121740..b0ef4a2e9 100644
--- a/server/tests/api/videos/video-files.ts
+++ b/server/tests/api/videos/video-files.ts
@@ -2,7 +2,14 @@
2 2
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' 5import {
6 cleanupTests,
7 createMultipleServers,
8 doubleFollow,
9 PeerTubeServer,
10 setAccessTokensToServers,
11 waitJobs
12} from '@shared/server-commands'
6 13
7describe('Test videos files', function () { 14describe('Test videos files', function () {
8 let servers: PeerTubeServer[] 15 let servers: PeerTubeServer[]
diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts
index d050a7a7e..218ec08ae 100644
--- a/server/tests/api/videos/video-hls.ts
+++ b/server/tests/api/videos/video-hls.ts
@@ -3,18 +3,20 @@
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { basename, join } from 'path' 5import { basename, join } from 'path'
6import { removeFragmentedMP4Ext, uuidRegex } from '@shared/core-utils'
7import { 6import {
8 areObjectStorageTestsDisabled,
9 checkDirectoryIsEmpty, 7 checkDirectoryIsEmpty,
10 checkResolutionsInMasterPlaylist, 8 checkResolutionsInMasterPlaylist,
11 checkSegmentHash, 9 checkSegmentHash,
12 checkTmpIsEmpty, 10 checkTmpIsEmpty,
11 expectStartWith,
12 hlsInfohashExist
13} from '@server/tests/shared'
14import { areObjectStorageTestsDisabled, removeFragmentedMP4Ext, uuidRegex } from '@shared/core-utils'
15import { HttpStatusCode, VideoStreamingPlaylistType } from '@shared/models'
16import {
13 cleanupTests, 17 cleanupTests,
14 createMultipleServers, 18 createMultipleServers,
15 doubleFollow, 19 doubleFollow,
16 expectStartWith,
17 hlsInfohashExist,
18 makeRawRequest, 20 makeRawRequest,
19 ObjectStorageCommand, 21 ObjectStorageCommand,
20 PeerTubeServer, 22 PeerTubeServer,
@@ -22,7 +24,6 @@ import {
22 waitJobs, 24 waitJobs,
23 webtorrentAdd 25 webtorrentAdd
24} from '@shared/server-commands' 26} from '@shared/server-commands'
25import { HttpStatusCode, VideoStreamingPlaylistType } from '@shared/models'
26import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants' 27import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants'
27 28
28const expect = chai.expect 29const expect = chai.expect
diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts
index 2518743f7..e8e0f01f1 100644
--- a/server/tests/api/videos/video-imports.ts
+++ b/server/tests/api/videos/video-imports.ts
@@ -4,21 +4,19 @@ import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { pathExists, readdir, remove } from 'fs-extra' 5import { pathExists, readdir, remove } from 'fs-extra'
6import { join } from 'path' 6import { join } from 'path'
7import { FIXTURE_URLS, testCaptionFile, testImage } from '@server/tests/shared'
8import { areHttpImportTestsDisabled } from '@shared/core-utils'
9import { VideoPrivacy, VideoResolution } from '@shared/models'
7import { 10import {
8 areHttpImportTestsDisabled,
9 cleanupTests, 11 cleanupTests,
10 createMultipleServers, 12 createMultipleServers,
11 createSingleServer, 13 createSingleServer,
12 doubleFollow, 14 doubleFollow,
13 FIXTURE_URLS,
14 PeerTubeServer, 15 PeerTubeServer,
15 setAccessTokensToServers, 16 setAccessTokensToServers,
16 setDefaultVideoChannel, 17 setDefaultVideoChannel,
17 testCaptionFile,
18 testImage,
19 waitJobs 18 waitJobs
20} from '@shared/server-commands' 19} from '@shared/server-commands'
21import { VideoPrivacy, VideoResolution } from '@shared/models'
22 20
23async function checkVideosServer1 (server: PeerTubeServer, idHttp: string, idMagnet: string, idTorrent: string) { 21async function checkVideosServer1 (server: PeerTubeServer, idHttp: string, idMagnet: string, idTorrent: string) {
24 const videoHttp = await server.videos.get({ id: idHttp }) 22 const videoHttp = await server.videos.get({ id: idHttp })
diff --git a/server/tests/api/videos/video-playlist-thumbnails.ts b/server/tests/api/videos/video-playlist-thumbnails.ts
index e6b6c34eb..5fdb0fc03 100644
--- a/server/tests/api/videos/video-playlist-thumbnails.ts
+++ b/server/tests/api/videos/video-playlist-thumbnails.ts
@@ -2,6 +2,8 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { testImage } from '@server/tests/shared'
6import { VideoPlaylistPrivacy } from '@shared/models'
5import { 7import {
6 cleanupTests, 8 cleanupTests,
7 createMultipleServers, 9 createMultipleServers,
@@ -9,10 +11,8 @@ import {
9 PeerTubeServer, 11 PeerTubeServer,
10 setAccessTokensToServers, 12 setAccessTokensToServers,
11 setDefaultVideoChannel, 13 setDefaultVideoChannel,
12 testImage,
13 waitJobs 14 waitJobs
14} from '../../../../shared/server-commands' 15} from '@shared/server-commands'
15import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
16 16
17const expect = chai.expect 17const expect = chai.expect
18 18
diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts
index 6279f5cd0..34327334f 100644
--- a/server/tests/api/videos/video-playlists.ts
+++ b/server/tests/api/videos/video-playlists.ts
@@ -2,8 +2,18 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { checkPlaylistFilesWereRemoved, testImage } from '@server/tests/shared'
6import { wait } from '@shared/core-utils'
7import {
8 HttpStatusCode,
9 VideoPlaylist,
10 VideoPlaylistCreateResult,
11 VideoPlaylistElementType,
12 VideoPlaylistPrivacy,
13 VideoPlaylistType,
14 VideoPrivacy
15} from '@shared/models'
5import { 16import {
6 checkPlaylistFilesWereRemoved,
7 cleanupTests, 17 cleanupTests,
8 createMultipleServers, 18 createMultipleServers,
9 doubleFollow, 19 doubleFollow,
@@ -11,19 +21,8 @@ import {
11 PlaylistsCommand, 21 PlaylistsCommand,
12 setAccessTokensToServers, 22 setAccessTokensToServers,
13 setDefaultVideoChannel, 23 setDefaultVideoChannel,
14 testImage,
15 wait,
16 waitJobs 24 waitJobs
17} from '@shared/server-commands' 25} from '@shared/server-commands'
18import {
19 HttpStatusCode,
20 VideoPlaylist,
21 VideoPlaylistCreateResult,
22 VideoPlaylistElementType,
23 VideoPlaylistPrivacy,
24 VideoPlaylistType,
25 VideoPrivacy
26} from '@shared/models'
27 26
28const expect = chai.expect 27const expect = chai.expect
29 28
diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts
index 13eb941ea..3051a443d 100644
--- a/server/tests/api/videos/video-privacy.ts
+++ b/server/tests/api/videos/video-privacy.ts
@@ -2,16 +2,9 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { 5import { wait } from '@shared/core-utils'
6 cleanupTests,
7 createSingleServer,
8 doubleFollow,
9 PeerTubeServer,
10 setAccessTokensToServers,
11 wait,
12 waitJobs
13} from '@shared/server-commands'
14import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models' 6import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models'
7import { cleanupTests, createSingleServer, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
15 8
16const expect = chai.expect 9const expect = chai.expect
17 10
diff --git a/server/tests/api/videos/video-schedule-update.ts b/server/tests/api/videos/video-schedule-update.ts
index 9408574ad..00b4f6cbc 100644
--- a/server/tests/api/videos/video-schedule-update.ts
+++ b/server/tests/api/videos/video-schedule-update.ts
@@ -2,16 +2,16 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { wait } from '@shared/core-utils'
6import { VideoPrivacy } from '@shared/models'
5import { 7import {
6 cleanupTests, 8 cleanupTests,
7 createMultipleServers, 9 createMultipleServers,
8 doubleFollow, 10 doubleFollow,
9 PeerTubeServer, 11 PeerTubeServer,
10 setAccessTokensToServers, 12 setAccessTokensToServers,
11 wait,
12 waitJobs 13 waitJobs
13} from '@shared/server-commands' 14} from '@shared/server-commands'
14import { VideoPrivacy } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
17 17
diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts
index f4b0bc53a..d24a8f4e1 100644
--- a/server/tests/api/videos/video-transcoder.ts
+++ b/server/tests/api/videos/video-transcoder.ts
@@ -3,29 +3,21 @@
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { omit } from 'lodash' 5import { omit } from 'lodash'
6import { getMaxBitrate, getMinLimitBitrate } from '@shared/core-utils' 6import { canDoQuickTranscode } from '@server/helpers/ffprobe-utils'
7import { generateHighBitrateVideo, generateVideoWithFramerate } from '@server/tests/shared'
8import { buildAbsoluteFixturePath, getMaxBitrate, getMinLimitBitrate } from '@shared/core-utils'
9import { getAudioStream, getMetadataFromFile, getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '@shared/extra-utils'
10import { HttpStatusCode, VideoState } from '@shared/models'
7import { 11import {
8 buildAbsoluteFixturePath,
9 cleanupTests, 12 cleanupTests,
10 createMultipleServers, 13 createMultipleServers,
11 doubleFollow, 14 doubleFollow,
12 generateHighBitrateVideo,
13 generateVideoWithFramerate,
14 makeGetRequest, 15 makeGetRequest,
15 PeerTubeServer, 16 PeerTubeServer,
16 setAccessTokensToServers, 17 setAccessTokensToServers,
17 waitJobs, 18 waitJobs,
18 webtorrentAdd 19 webtorrentAdd
19} from '@shared/server-commands' 20} from '@shared/server-commands'
20import { HttpStatusCode, VideoState } from '@shared/models'
21import {
22 canDoQuickTranscode,
23 getAudioStream,
24 getMetadataFromFile,
25 getVideoFileBitrate,
26 getVideoFileFPS,
27 getVideoFileResolution
28} from '../../../helpers/ffprobe-utils'
29 21
30const expect = chai.expect 22const expect = chai.expect
31 23
diff --git a/server/tests/api/videos/videos-history.ts b/server/tests/api/videos/videos-history.ts
index 813fc4f45..4e5ba13aa 100644
--- a/server/tests/api/videos/videos-history.ts
+++ b/server/tests/api/videos/videos-history.ts
@@ -2,16 +2,16 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { wait } from '@shared/core-utils'
6import { HttpStatusCode, Video } from '@shared/models'
5import { 7import {
6 cleanupTests, 8 cleanupTests,
7 createSingleServer, 9 createSingleServer,
8 HistoryCommand, 10 HistoryCommand,
9 killallServers, 11 killallServers,
10 PeerTubeServer, 12 PeerTubeServer,
11 setAccessTokensToServers, 13 setAccessTokensToServers
12 wait
13} from '@shared/server-commands' 14} from '@shared/server-commands'
14import { HttpStatusCode, Video } from '@shared/models'
15 15
16const expect = chai.expect 16const expect = chai.expect
17 17
diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts
index 08a4efb63..61fc0cb20 100644
--- a/server/tests/api/videos/videos-overview.ts
+++ b/server/tests/api/videos/videos-overview.ts
@@ -2,8 +2,9 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, wait } from '@shared/server-commands' 5import { wait } from '@shared/core-utils'
6import { VideosOverview } from '@shared/models' 6import { VideosOverview } from '@shared/models'
7import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
7 8
8const expect = chai.expect 9const expect = chai.expect
9 10
diff --git a/server/tests/api/videos/videos-views-cleaner.ts b/server/tests/api/videos/videos-views-cleaner.ts
index 7f7597af4..e6815a4a8 100644
--- a/server/tests/api/videos/videos-views-cleaner.ts
+++ b/server/tests/api/videos/videos-views-cleaner.ts
@@ -2,6 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { wait } from '@shared/core-utils'
5import { 6import {
6 cleanupTests, 7 cleanupTests,
7 createMultipleServers, 8 createMultipleServers,
@@ -9,9 +10,8 @@ import {
9 killallServers, 10 killallServers,
10 PeerTubeServer, 11 PeerTubeServer,
11 setAccessTokensToServers, 12 setAccessTokensToServers,
12 wait,
13 waitJobs 13 waitJobs
14} from '../../../../shared/server-commands' 14} from '@shared/server-commands'
15 15
16const expect = chai.expect 16const expect = chai.expect
17 17