See jest test errors on e-mail. Nodemail version of jest-email-reporter by Anton Karmanov
npm install --save-dev jest-nodemailer-reporter
You must configure the jest config. Do not forget from
and to
e-mail addresses.
module.exports = {
...
reporters: [
"default",
["jest-nodemailer-reporter", {
"transporter": {
"sendmail": true,
"newline": 'unix',
"path": '/usr/sbin/sendmail'
},
"from": "from@example.com",
"to": "to@example.com",
"subject": "Optional subject", // optional
"reportIfSuccess": true // optional, default is false; it send e-mail message if tests were successful
}]
],
...
}