]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/video-comments.ts
Cleanup tests
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / video-comments.ts
index b80d91279992256756a9367acfa8b6c0950d42ec..bb14abbfd2c77e6c2a19efd2ba3e30ee12297435 100644 (file)
@@ -4,7 +4,7 @@ import * as chai from 'chai'
 import 'mocha'
 import {
   createUser,
-  flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers,
+  flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePostBodyRequest, flushAndRunServer, ServerInfo, setAccessTokensToServers,
   uploadVideo, userLogin
 } from '../../../../shared/extra-utils'
 import {
@@ -29,9 +29,7 @@ describe('Test video comments API validator', function () {
   before(async function () {
     this.timeout(30000)
 
-    await flushTests()
-
-    server = await runServer(1)
+    server = await flushAndRunServer(1)
 
     await setAccessTokensToServers([ server ])
 
@@ -253,12 +251,7 @@ describe('Test video comments API validator', function () {
     it('Should return conflict on comment thread add')
   })
 
-  after(async function () {
+  after(function () {
     killallServers([ server ])
-
-    // Keep the logs if the test failed
-    if (this['ok']) {
-      await flushTests()
-    }
   })
 })