JSPM

nightwatch-slack-failure-reporter

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q21960F
  • License MIT

Notifies Nightwatch.js reports to Slack

Package Exports

  • nightwatch-slack-failure-reporter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nightwatch-slack-failure-reporter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

nightwatch-slack-failure-reporter

A Nightwatch.js reporter that notifies results to Slack

Install

npm install --save-dev nightwatch-slack-failure-reporter

Usage

Using Built in Nightwatch reporter

// globals.js
module.exports = {
  reporter: (require('nightwatch-slack-failure-reporter')(options))
}

Using Command Line Options

nightwatch --reporter node_modules/nightwatch-slack-failure-reporter/lib/report.js

Options

You can configure Slack reporter options in test globals or configuration file.

options = {
  slack_message: function(results, options) { // function or message string
    return {
      text: 'Test completed, passed ' + results.passed + ', failed ' + results.failed,
      username: 'Nightwatch',
      icon_emoji: '👻'
    } // Message payload or string
  },
  slack_webhook_url: 'https://hooks.slack.com/services/...'
  // This can be specified with SLACK_WEBHOOK_URL environment variable
}

Author

Atsushi Nagase

License

MIT License