From 863477173efa82a4412d2e522aa46462249f9199 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 17 Aug 2022 15:44:32 +0200 Subject: Cleanup tests imports --- server/tests/api/views/video-views-counter.ts | 4 +--- server/tests/api/views/video-views-overall-stats.ts | 4 +--- server/tests/api/views/video-views-retention-stats.ts | 4 +--- server/tests/api/views/video-views-timeserie-stats.ts | 4 +--- server/tests/api/views/videos-views-cleaner.ts | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) (limited to 'server/tests/api/views') 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 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import * as chai from 'chai' +import { expect } from 'chai' import { FfmpegCommand } from 'fluent-ffmpeg' import { prepareViewsServers, prepareViewsVideos, processViewsBuffer } from '@server/tests/shared' import { wait } from '@shared/core-utils' import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands' -const expect = chai.expect - describe('Test video views/viewers counters', function () { let servers: PeerTubeServer[] 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 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import * as chai from 'chai' +import { expect } from 'chai' import { FfmpegCommand } from 'fluent-ffmpeg' import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' import { cleanupTests, PeerTubeServer, stopFfmpeg, waitJobs } from '@shared/server-commands' -const expect = chai.expect - describe('Test views overall stats', function () { let servers: PeerTubeServer[] 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 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import * as chai from 'chai' +import { expect } from 'chai' import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' import { cleanupTests, PeerTubeServer } from '@shared/server-commands' -const expect = chai.expect - describe('Test views retention stats', function () { let servers: PeerTubeServer[] 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 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import * as chai from 'chai' +import { expect } from 'chai' import { FfmpegCommand } from 'fluent-ffmpeg' import { prepareViewsServers, prepareViewsVideos, processViewersStats } from '@server/tests/shared' import { VideoStatsTimeserie, VideoStatsTimeserieMetric } from '@shared/models' import { cleanupTests, PeerTubeServer, stopFfmpeg } from '@shared/server-commands' -const expect = chai.expect - function buildOneMonthAgo () { const monthAgo = new Date() 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 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import * as chai from 'chai' +import { expect } from 'chai' import { wait } from '@shared/core-utils' import { cleanupTests, @@ -12,8 +12,6 @@ import { waitJobs } from '@shared/server-commands' -const expect = chai.expect - describe('Test video views cleaner', function () { let servers: PeerTubeServer[] -- cgit v1.2.3