Friday 6 April 2018

How do I go about testing node mailer using mocha without actually sending an email?

I currently have an endpoint which accepts data and then sends an email with node mailer. I currently have an integration test that on the endpoint, but it sends an actual email every time I run my test suite. How can I avoid sending an actual email on every test, yet make sure that the endpoint is working correctly?Thanks!

Submitted April 06, 2018 at 10:47PM by Hansolo510

No comments:

Post a Comment