]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/contact-form.ts
Use test wrapper exit function
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / contact-form.ts
index 26ebb4ed7a21d8bcd324a37292a9329a149c56dd..ba51198b3de72b35d3de072342c41647e8236479 100644 (file)
@@ -2,7 +2,15 @@
 
 import * as chai from 'chai'
 import 'mocha'
-import { flushTests, killallServers, flushAndRunServer, ServerInfo, setAccessTokensToServers, wait } from '../../../../shared/extra-utils'
+import {
+  flushTests,
+  killallServers,
+  flushAndRunServer,
+  ServerInfo,
+  setAccessTokensToServers,
+  wait,
+  cleanupTests
+} from '../../../../shared/extra-utils'
 import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
 import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
 import { sendContactForm } from '../../../../shared/extra-utils/server/contact-form'
@@ -78,8 +86,9 @@ describe('Test contact form', function () {
     })
   })
 
-  after(function () {
+  after(async function () {
     MockSmtpServer.Instance.kill()
-    killallServers([ server ])
+
+    await cleanupTests([ server ])
   })
 })