From 2bd2f62a764fb33758aeab5d5e4b0e964f7a17bc Mon Sep 17 00:00:00 2001 From: Skywonda Date: Sat, 24 Jun 2023 01:58:15 +0100 Subject: [PATCH] fix: remove email test file --- src/auth/__tests__/auth.email.test.js | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/auth/__tests__/auth.email.test.js diff --git a/src/auth/__tests__/auth.email.test.js b/src/auth/__tests__/auth.email.test.js deleted file mode 100644 index b15766c..0000000 --- a/src/auth/__tests__/auth.email.test.js +++ /dev/null @@ -1,23 +0,0 @@ -const { createTransport } = require('nodemailer-mock'); - -const { sendEmail } = require('../../../utils/sendMails'); - -const transporter = createTransport(); - -describe('sendEmail', () => { - it('should send an email successfully', async () => { - const to = 'princesam3600@gmail.com'; - const subject = 'Test Email'; - const body = '

This is a test email

'; - - await sendEmail({ email: to, subject, body }); - - // Assertions - const sentMail = transporter.mock.getSetMail(); - console.log(sentMail); - expect(sentMail.length).toBe(1); - expect(sentMail[0].to).toBe(to); - expect(sentMail[0].subject).toBe(subject); - expect(sentMail[0].html).toBe(body); - }); -});