.toBeCalledWith(message.title, message.description); expect(nodemailer.sendMail.mock.calls.length).toBe(1); expect(nodemailer.sendMail.mock.calls[0][0]).toMatchSnapshot(); }); .toBeCalledWith(message.title, message.description); expect(nodemailer.sendMail.mock.calls.length).toBe(1); expect(nodemailer.sendMail.mock.calls[0][0]).toMatchSnapshot();
}; nodemailer.sendMail(mailOptions, function(error, info){ if(error) console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ err while sending email", error);
}; nodemailer.sendMail(mailOptions, function(error, info){ if(error) console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ err while sending email", error);