]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/views.ts
Fix s3 mock cleanup
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / views.ts
index fe037b1455ba709cda296e229c61dbcaf1c798e3..84d31c5094b8f9cb8269cc78d48c3d43fcc64651 100644 (file)
@@ -1,6 +1,5 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import 'mocha'
 import { HttpStatusCode, VideoPrivacy } from '@shared/models'
 import {
   cleanupTests,
@@ -64,12 +63,12 @@ describe('Test videos views', function () {
     })
 
     it('Should fail without token', async function () {
-      await servers[0].videoStats.getOverallStats({ videoId: videoId, token: null, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 })
+      await servers[0].videoStats.getOverallStats({ videoId, token: null, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 })
     })
 
     it('Should fail with another token', async function () {
       await servers[0].videoStats.getOverallStats({
-        videoId: videoId,
+        videoId,
         token: userAccessToken,
         expectedStatus: HttpStatusCode.FORBIDDEN_403
       })
@@ -114,7 +113,7 @@ describe('Test videos views', function () {
 
     it('Should fail without token', async function () {
       await servers[0].videoStats.getTimeserieStats({
-        videoId: videoId,
+        videoId,
         token: null,
         metric: 'viewers',
         expectedStatus: HttpStatusCode.UNAUTHORIZED_401
@@ -123,7 +122,7 @@ describe('Test videos views', function () {
 
     it('Should fail with another token', async function () {
       await servers[0].videoStats.getTimeserieStats({
-        videoId: videoId,
+        videoId,
         token: userAccessToken,
         metric: 'viewers',
         expectedStatus: HttpStatusCode.FORBIDDEN_403
@@ -176,7 +175,7 @@ describe('Test videos views', function () {
       await servers[0].videoStats.getTimeserieStats({
         videoId,
         metric: 'viewers',
-        startDate: new Date('2021-04-07T08:31:57.126Z'),
+        startDate: new Date('2000-04-07T08:31:57.126Z'),
         endDate: new Date(),
         expectedStatus: HttpStatusCode.BAD_REQUEST_400
       })
@@ -198,7 +197,7 @@ describe('Test videos views', function () {
 
     it('Should fail without token', async function () {
       await servers[0].videoStats.getRetentionStats({
-        videoId: videoId,
+        videoId,
         token: null,
         expectedStatus: HttpStatusCode.UNAUTHORIZED_401
       })
@@ -206,7 +205,7 @@ describe('Test videos views', function () {
 
     it('Should fail with another token', async function () {
       await servers[0].videoStats.getRetentionStats({
-        videoId: videoId,
+        videoId,
         token: userAccessToken,
         expectedStatus: HttpStatusCode.FORBIDDEN_403
       })