]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/videos-overview.ts
Fix reset sequelize instance
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / videos-overview.ts
index f0657b334381e0a5d4cd3edb259cc3d4b5892ff3..6e723c5101b2e0f53cdcf4a6f124c6b8276f059d 100644 (file)
@@ -1,14 +1,12 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import 'mocha'
-import * as chai from 'chai'
-import { cleanupTests, flushAndRunServer, ServerInfo, setAccessTokensToServers, wait } from '@shared/extra-utils'
+import { expect } from 'chai'
+import { wait } from '@shared/core-utils'
 import { VideosOverview } from '@shared/models'
-
-const expect = chai.expect
+import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
 
 describe('Test a videos overview', function () {
-  let server: ServerInfo = null
+  let server: PeerTubeServer = null
 
   function testOverviewCount (overview: VideosOverview, expected: number) {
     expect(overview.tags).to.have.lengthOf(expected)
@@ -19,7 +17,7 @@ describe('Test a videos overview', function () {
   before(async function () {
     this.timeout(30000)
 
-    server = await flushAndRunServer(1)
+    server = await createSingleServer(1)
 
     await setAccessTokensToServers([ server ])
   })
@@ -31,7 +29,7 @@ describe('Test a videos overview', function () {
   })
 
   it('Should upload 5 videos in a specific category, tag and channel but not include them in overview', async function () {
-    this.timeout(30000)
+    this.timeout(60000)
 
     await wait(3000)
 
@@ -49,7 +47,7 @@ describe('Test a videos overview', function () {
   })
 
   it('Should upload another video and include all videos in the overview', async function () {
-    this.timeout(30000)
+    this.timeout(60000)
 
     {
       for (let i = 1; i < 6; i++) {