diff options
Diffstat (limited to 'server/tests/api/views')
5 files changed, 5 insertions, 15 deletions
diff --git a/server/tests/api/views/video-views-counter.ts b/server/tests/api/views/video-views-counter.ts index 9ade1dc0c..ca33ff9cd 100644 --- a/server/tests/api/views/video-views-counter.ts +++ b/server/tests/api/views/video-views-counter.ts | |||
@@ -1,13 +1,11 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { FfmpegCommand } from 'fluent-ffmpeg' | 4 | import { FfmpegCommand } from 'fluent-ffmpeg' |
5 | import { prepareViewsServers, prepareViewsVideos, processViewsBuffer } from '@server/tests/shared' | 5 | import { prepareViewsServers, prepareViewsVideos, processViewsBuffer } from '@server/tests/shared' |
6 | import { wait } from '@shared/core-utils' | 6 | import { wait } from '@shared/core-utils' |
7 | import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands' | 7 | import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands' |
8 | 8 | ||
9 | const expect = chai.expect | ||
10 | |||
11 | describe('Test video views/viewers counters', function () { | 9 | describe('Test video views/viewers counters', function () { |
12 | let servers: PeerTubeServer[] | 10 | let servers: PeerTubeServer[] |
13 | 11 | ||
diff --git a/server/tests/api/views/video-views-overall-stats.ts b/server/tests/api/views/video-views-overall-stats.ts index b21d70c0b..bb00684ef 100644 --- a/server/tests/api/views/video-views-overall-stats.ts +++ b/server/tests/api/views/video-views-overall-stats.ts | |||
@@ -1,12 +1,10 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { FfmpegCommand } from 'fluent-ffmpeg' | 4 | import { FfmpegCommand } from 'fluent-ffmpeg' |
5 | import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' | 5 | import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' |
6 | import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands' | 6 | import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands' |
7 | 7 | ||
8 | const expect = chai.expect | ||
9 | |||
10 | describe('Test views overall stats', function () { | 8 | describe('Test views overall stats', function () { |
11 | let servers: PeerTubeServer[] | 9 | let servers: PeerTubeServer[] |
12 | 10 | ||
diff --git a/server/tests/api/views/video-views-retention-stats.ts b/server/tests/api/views/video-views-retention-stats.ts index 307d6de07..621b05110 100644 --- a/server/tests/api/views/video-views-retention-stats.ts +++ b/server/tests/api/views/video-views-retention-stats.ts | |||
@@ -1,11 +1,9 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' | 4 | import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' |
5 | import { cleanupTests, PeerTubeServer } from '@shared/server-commands' | 5 | import { cleanupTests, PeerTubeServer } from '@shared/server-commands' |
6 | 6 | ||
7 | const expect = chai.expect | ||
8 | |||
9 | describe('Test views retention stats', function () { | 7 | describe('Test views retention stats', function () { |
10 | let servers: PeerTubeServer[] | 8 | let servers: PeerTubeServer[] |
11 | 9 | ||
diff --git a/server/tests/api/views/video-views-timeserie-stats.ts b/server/tests/api/views/video-views-timeserie-stats.ts index d6c89a63e..e8cb34ad6 100644 --- a/server/tests/api/views/video-views-timeserie-stats.ts +++ b/server/tests/api/views/video-views-timeserie-stats.ts | |||
@@ -1,13 +1,11 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { FfmpegCommand } from 'fluent-ffmpeg' | 4 | import { FfmpegCommand } from 'fluent-ffmpeg' |
5 | import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' | 5 | import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' |
6 | import { VideoStatsTimeserie, VideoStatsTimeserieMetric } from '@shared/models' | 6 | import { VideoStatsTimeserie, VideoStatsTimeserieMetric } from '@shared/models' |
7 | import { cleanupTests, PeerTubeServer, stopFfmpeg } from '@shared/server-commands' | 7 | import { cleanupTests, PeerTubeServer, stopFfmpeg } from '@shared/server-commands' |
8 | 8 | ||
9 | const expect = chai.expect | ||
10 | |||
11 | function buildOneMonthAgo () { | 9 | function buildOneMonthAgo () { |
12 | const monthAgo = new Date() | 10 | const monthAgo = new Date() |
13 | monthAgo.setHours(0, 0, 0, 0) | 11 | monthAgo.setHours(0, 0, 0, 0) |
diff --git a/server/tests/api/views/videos-views-cleaner.ts b/server/tests/api/views/videos-views-cleaner.ts index e28f82668..7c543a74a 100644 --- a/server/tests/api/views/videos-views-cleaner.ts +++ b/server/tests/api/views/videos-views-cleaner.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import { expect } from 'chai' |
4 | import { wait } from '@shared/core-utils' | 4 | import { wait } from '@shared/core-utils' |
5 | import { | 5 | import { |
6 | cleanupTests, | 6 | cleanupTests, |
@@ -12,8 +12,6 @@ import { | |||
12 | waitJobs | 12 | waitJobs |
13 | } from '@shared/server-commands' | 13 | } from '@shared/server-commands' |
14 | 14 | ||
15 | const expect = chai.expect | ||
16 | |||
17 | describe('Test video views cleaner', function () { | 15 | describe('Test video views cleaner', function () { |
18 | let servers: PeerTubeServer[] | 16 | let servers: PeerTubeServer[] |
19 | 17 | ||