From af37210c0bd7bf343fe366ddd2b253e2214f5547 Mon Sep 17 00:00:00 2001 From: Josh Morel Date: Sat, 15 Dec 2018 08:51:51 -0500 Subject: throw error if MailDev doesn't run also allow calling in multiple file --- server/tests/api/server/email.ts | 4 ++-- server/tests/api/users/users-verification.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server/tests') diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts index 13df772c6..b8d29ef81 100644 --- a/server/tests/api/server/email.ts +++ b/server/tests/api/server/email.ts @@ -20,7 +20,7 @@ import { ServerInfo, setAccessTokensToServers } from '../../../../shared/utils' -import { mockSmtpServer } from '../../../../shared/utils/miscs/email' +import { MockSmtpServer } from '../../../../shared/utils/miscs/email' import { waitJobs } from '../../../../shared/utils/server/jobs' const expect = chai.expect @@ -41,7 +41,7 @@ describe('Test emails', function () { before(async function () { this.timeout(30000) - await mockSmtpServer(emails) + await MockSmtpServer.Instance.collectEmails(emails) await flushTests() diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts index b1733e45e..afc8a0059 100644 --- a/server/tests/api/users/users-verification.ts +++ b/server/tests/api/users/users-verification.ts @@ -7,7 +7,7 @@ import { userLogin, login, runServer, ServerInfo, verifyEmail, updateCustomSubConfig } from '../../../../shared/utils' import { setAccessTokensToServers } from '../../../../shared/utils/users/login' -import { mockSmtpServer } from '../../../../shared/utils/miscs/email' +import { MockSmtpServer } from '../../../../shared/utils/miscs/email' import { waitJobs } from '../../../../shared/utils/server/jobs' const expect = chai.expect @@ -30,7 +30,7 @@ describe('Test users account verification', function () { before(async function () { this.timeout(30000) - await mockSmtpServer(emails) + await MockSmtpServer.Instance.collectEmails(emails) await flushTests() -- cgit v1.2.3