From 9639bd175726b73f8fe664b5ced12a72407b1f0b Mon Sep 17 00:00:00 2001 From: buoyantair Date: Mon, 29 Oct 2018 22:18:31 +0530 Subject: Move utils to /shared Move utils used by /server/tools/* & /server/tests/**/* into /shared folder. Issue: #1336 --- server/tests/utils/miscs/email.ts | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 server/tests/utils/miscs/email.ts (limited to 'server/tests/utils/miscs/email.ts') diff --git a/server/tests/utils/miscs/email.ts b/server/tests/utils/miscs/email.ts deleted file mode 100644 index 21accd09d..000000000 --- a/server/tests/utils/miscs/email.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as MailDev from 'maildev' - -function mockSmtpServer (emailsCollection: object[]) { - const maildev = new MailDev({ - ip: '127.0.0.1', - smtp: 1025, - disableWeb: true, - silent: true - }) - maildev.on('new', email => emailsCollection.push(email)) - - return new Promise((res, rej) => { - maildev.listen(err => { - if (err) return rej(err) - - return res() - }) - }) -} - -// --------------------------------------------------------------------------- - -export { - mockSmtpServer -} -- cgit v1.2.3