aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/views
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/views')
-rw-r--r--server/tests/api/views/video-views-counter.ts4
-rw-r--r--server/tests/api/views/video-views-overall-stats.ts4
-rw-r--r--server/tests/api/views/video-views-retention-stats.ts4
-rw-r--r--server/tests/api/views/video-views-timeserie-stats.ts4
-rw-r--r--server/tests/api/views/videos-views-cleaner.ts4
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
3import * as chai from 'chai' 3import { expect } from 'chai'
4import { FfmpegCommand } from 'fluent-ffmpeg' 4import { FfmpegCommand } from 'fluent-ffmpeg'
5import { prepareViewsServers, prepareViewsVideos, processViewsBuffer } from '@server/tests/shared' 5import { prepareViewsServers, prepareViewsVideos, processViewsBuffer } from '@server/tests/shared'
6import { wait } from '@shared/core-utils' 6import { wait } from '@shared/core-utils'
7import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands' 7import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands'
8 8
9const expect = chai.expect
10
11describe('Test video views/viewers counters', function () { 9describe('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
3import * as chai from 'chai' 3import { expect } from 'chai'
4import { FfmpegCommand } from 'fluent-ffmpeg' 4import { FfmpegCommand } from 'fluent-ffmpeg'
5import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' 5import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared'
6import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands' 6import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands'
7 7
8const expect = chai.expect
9
10describe('Test views overall stats', function () { 8describe('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
3import * as chai from 'chai' 3import { expect } from 'chai'
4import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' 4import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared'
5import { cleanupTests, PeerTubeServer } from '@shared/server-commands' 5import { cleanupTests, PeerTubeServer } from '@shared/server-commands'
6 6
7const expect = chai.expect
8
9describe('Test views retention stats', function () { 7describe('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
3import * as chai from 'chai' 3import { expect } from 'chai'
4import { FfmpegCommand } from 'fluent-ffmpeg' 4import { FfmpegCommand } from 'fluent-ffmpeg'
5import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' 5import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared'
6import { VideoStatsTimeserie, VideoStatsTimeserieMetric } from '@shared/models' 6import { VideoStatsTimeserie, VideoStatsTimeserieMetric } from '@shared/models'
7import { cleanupTests, PeerTubeServer, stopFfmpeg } from '@shared/server-commands' 7import { cleanupTests, PeerTubeServer, stopFfmpeg } from '@shared/server-commands'
8 8
9const expect = chai.expect
10
11function buildOneMonthAgo () { 9function 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
3import * as chai from 'chai' 3import { expect } from 'chai'
4import { wait } from '@shared/core-utils' 4import { wait } from '@shared/core-utils'
5import { 5import {
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
15const expect = chai.expect
16
17describe('Test video views cleaner', function () { 15describe('Test video views cleaner', function () {
18 let servers: PeerTubeServer[] 16 let servers: PeerTubeServer[]
19 17