aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users/users-verification.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/users/users-verification.ts')
-rw-r--r--server/tests/api/users/users-verification.ts13
1 files changed, 3 insertions, 10 deletions
diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts
index 7fcd3e50b..295caae97 100644
--- a/server/tests/api/users/users-verification.ts
+++ b/server/tests/api/users/users-verification.ts
@@ -4,7 +4,7 @@ import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { 5import {
6 registerUser, flushTests, getUserInformation, getMyUserInformation, killallServers, 6 registerUser, flushTests, getUserInformation, getMyUserInformation, killallServers,
7 userLogin, login, runServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait 7 userLogin, login, flushAndRunServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait
8} from '../../../../shared/extra-utils' 8} from '../../../../shared/extra-utils'
9import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' 9import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
10import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' 10import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
@@ -32,14 +32,12 @@ describe('Test users account verification', function () {
32 32
33 await MockSmtpServer.Instance.collectEmails(emails) 33 await MockSmtpServer.Instance.collectEmails(emails)
34 34
35 await flushTests()
36
37 const overrideConfig = { 35 const overrideConfig = {
38 smtp: { 36 smtp: {
39 hostname: 'localhost' 37 hostname: 'localhost'
40 } 38 }
41 } 39 }
42 server = await runServer(1, overrideConfig) 40 server = await flushAndRunServer(1, overrideConfig)
43 41
44 await setAccessTokensToServers([ server ]) 42 await setAccessTokensToServers([ server ])
45 }) 43 })
@@ -122,13 +120,8 @@ describe('Test users account verification', function () {
122 await userLogin(server, user2) 120 await userLogin(server, user2)
123 }) 121 })
124 122
125 after(async function () { 123 after(function () {
126 MockSmtpServer.Instance.kill() 124 MockSmtpServer.Instance.kill()
127 killallServers([ server ]) 125 killallServers([ server ])
128
129 // Keep the logs if the test failed
130 if (this[ 'ok' ]) {
131 await flushTests()
132 }
133 }) 126 })
134}) 127})