From 1c4694aff58b318cbde056f6903ba7900964e569 Mon Sep 17 00:00:00 2001 From: sudoer777 <78781902+sudoer777@users.noreply.github.com> Date: Mon, 4 Oct 2021 13:59:38 -0600 Subject: [PATCH] Do not import .env file in testing server --- mail/mail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail/mail.js b/mail/mail.js index caac4d4..1c9ccef 100644 --- a/mail/mail.js +++ b/mail/mail.js @@ -1,7 +1,7 @@ const app = require('../app'); const nodemailer = require('nodemailer'); -if (process.env.NODE_ENV !== 'production') { +if (process.env.NODE_ENV !== 'production' || process.env.NODE_ENV !== 'testing') { require('dotenv').config(); }