Socket
Socket
Sign inDemoInstall

testcafe-reporter-smtp

Package Overview
Dependencies
224
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

15

lib/index.js

@@ -84,10 +84,2 @@ /**

renderErrors: function renderErrors(errors) {
var _this2 = this;
errors.forEach(function (error, id) {
_this2.slack.addErrorMessage(_this2.formatError(error, id + 1 + ' '));
});
},
reportTaskDone: function reportTaskDone(endTime, passed, warnings) {

@@ -111,4 +103,11 @@ console.log('endTime ' + endTime + ', warnings ' + warnings);

var from = getEnv('TESTCAFE_SMTP_FROM', null);
if (!from) {
var userInfo = require("os").userInfo();
from = '"' + userInfo.username + '" <' + userInfo.email + '>';
}
// Pass all our data to the email builder for templating and sending.
var mail = new _MailMessage2['default']({
from: from,
recipients: getEnv('TESTCAFE_SMTP_TO_LIST', 'test@example.com, test2@example.com'), // list of receivers

@@ -115,0 +114,0 @@ subject: subject,

@@ -57,6 +57,5 @@ 'use strict';

// setup email data with unicode symbols
var userInfo = require("os").userInfo();
// console.log('User info: ', userInfo);
var mailOptions = {
from: '"' + userInfo.username + '" <' + userInfo.email + '>', // sender address
from: this.info.from, // sender address
to: this.info.recipients,

@@ -63,0 +62,0 @@ subject: this.info.subject, // Subject line

{
"name": "testcafe-reporter-smtp",
"version": "0.0.1",
"version": "0.0.2",
"description": "TestCafe SMTP reporter plugin.",

@@ -30,3 +30,2 @@ "repository": {

"devDependencies": {
"callsite-record": "^3.2.0",
"del": "^1.2.0",

@@ -33,0 +32,0 @@ "gulp": "^3.9.1",

@@ -29,2 +29,3 @@ # TestCafe Reporter SMTP

- TESTCAFE_SMTP_SECURE - true | false - passed to the `nodemailer` *secure* option (see [Security and TLS](#security-and-tls) below)
- TESTCAFE_SMTP_FROM - From address to use when sending email. If not provided, attempts to sniff using `require("os").userInfo()`
- TESTCAFE_SMTP_TO_LIST - comma separated list of email addresses to send reports to

@@ -72,2 +73,4 @@ - TESTCAFE_SMTP_REPORTONLYFAILURES - causes no email to be sent if all tests passed (when you only want to be notified of tests failing)

**Please Note:** The command line `testcafe` binary executes a forced process stop once the test has finished running, which will probably terminate before the SMTP communication has completed. You may have better results using the runner API below.
### Running tests from a runner:

@@ -74,0 +77,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc