]> 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 36664b17fc25475e69b8e99a655d4f5fde08efec..e1e65260fe1868198f795a9f9dcc419e65b9b645 100644 (file)
@@ -3,6 +3,7 @@
 import * as chai from 'chai'
 import 'mocha'
 import {
+  cleanupTests,
   createUser,
   doubleFollow,
   flushAndRunMultipleServers,
@@ -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)
   })
 })