]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/videos-filter.ts
Use test wrapper exit function
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / videos-filter.ts
index 920ca0023050862db3ca60f475f83665e1556280..e1e65260fe1868198f795a9f9dcc419e65b9b645 100644 (file)
@@ -3,6 +3,7 @@
 import * as chai from 'chai'
 import 'mocha'
 import {
+  cleanupTests,
   createUser,
   doubleFollow,
   flushAndRunMultipleServers,
@@ -13,7 +14,7 @@ import {
   setAccessTokensToServers,
   uploadVideo,
   userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
 import { Video, VideoPrivacy } from '../../../../shared/models/videos'
 import { UserRole } from '../../../../shared/models/users'
 
@@ -55,8 +56,6 @@ describe('Test videos filter validator', function () {
   before(async function () {
     this.timeout(120000)
 
-    await flushTests()
-
     servers = await flushAndRunMultipleServers(2)
 
     await setAccessTokensToServers(servers)
@@ -122,11 +121,6 @@ describe('Test videos filter validator', function () {
   })
 
   after(async function () {
-    killallServers(servers)
-
-    // Keep the logs if the test failed
-    if (this['ok']) {
-      await flushTests()
-    }
+    await cleanupTests(servers)
   })
 })