From 210feb6cc484a6c5c63c98f770de34e223f944cb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Apr 2019 10:53:40 +0200 Subject: Cleanup tests --- server/tests/api/check-params/contact-form.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'server/tests/api/check-params/contact-form.ts') diff --git a/server/tests/api/check-params/contact-form.ts b/server/tests/api/check-params/contact-form.ts index 9ba6136aa..6c7781f13 100644 --- a/server/tests/api/check-params/contact-form.ts +++ b/server/tests/api/check-params/contact-form.ts @@ -7,7 +7,7 @@ import { immutableAssign, killallServers, reRunServer, - runServer, + flushAndRunServer, ServerInfo, setAccessTokensToServers } from '../../../../shared/extra-utils' @@ -34,11 +34,10 @@ describe('Test contact form API validators', function () { before(async function () { this.timeout(60000) - await flushTests() await MockSmtpServer.Instance.collectEmails(emails) // Email is disabled - server = await runServer(1) + server = await flushAndRunServer(1) }) it('Should not accept a contact form if emails are disabled', async function () { @@ -84,13 +83,8 @@ describe('Test contact form API validators', function () { await sendContactForm(immutableAssign(defaultBody, { url: server.url })) }) - after(async function () { + after(function () { MockSmtpServer.Instance.kill() killallServers([ server ]) - - // Keep the logs if the test failed - if (this['ok']) { - await flushTests() - } }) }) -- cgit v1.2.3