]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/search/search-videos.ts
Fix CI using 127.0.0.1 for tests
[github/Chocobozzz/PeerTube.git] / server / tests / api / search / search-videos.ts
index ff4c3c161897699469134979f00aec247f058d95..5e85e3aa77ff672bce644a707a355cfdbc39b3fc 100644 (file)
@@ -1,7 +1,6 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import 'mocha'
-import * as chai from 'chai'
+import { expect } from 'chai'
 import { wait } from '@shared/core-utils'
 import { VideoPrivacy } from '@shared/models'
 import {
@@ -17,8 +16,6 @@ import {
   stopFfmpeg
 } from '@shared/server-commands'
 
-const expect = chai.expect
-
 describe('Test videos search', function () {
   let server: PeerTubeServer
   let remoteServer: PeerTubeServer
@@ -106,7 +103,7 @@ describe('Test videos search', function () {
         licence: 2,
         language: 'en'
       }
-      await server.videos.upload({ attributes: attributes })
+      await server.videos.upload({ attributes })
 
       await server.videos.upload({ attributes: { ...attributes, name: attributes.name + ' duplicate' } })
     }
@@ -119,7 +116,7 @@ describe('Test videos search', function () {
         licence: 3,
         language: 'pl'
       }
-      await server.videos.upload({ attributes: attributes })
+      await server.videos.upload({ attributes })
     }
 
     {
@@ -210,7 +207,7 @@ describe('Test videos search', function () {
     const search = {
       categoryOneOf: [ 3 ]
     }
-    const body = await command.advancedVideoSearch({ search: search })
+    const body = await command.advancedVideoSearch({ search })
 
     expect(body.total).to.equal(1)