Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

mocha-ci-slack-reporter

Package Overview
Dependencies
2
Maintainers
1
Versions
2
Issues
File Explorer

Advanced tools

mocha-ci-slack-reporter

Slack reporter for Mocha when running in CI environments

    1.0.1latest
    GitHub

Version published
Maintainers
1
Weekly downloads
335
decreased by-26.7%

Weekly downloads

Readme

Source

mocha-ci-slack-reporter

Slack reporter for Mocha when running in CI environments.

Although this can be used in non-CI environments too, it is suited for CI environment in that it is able to report build number, build URL, etc alongside standard test pass/failed information.

It posts a single notification to your Slack channel with a summary of the test results.

Installation

$ npm install mocha-ci-slack-reporter

Usage

All options:

  • url (mandatory) - Slack incoming webhook URL
  • username (mandatory) - Username to post as
  • channel (mandatory) - Channel to post to
  • logsUrl - URL to logs page (appended to message text as a View logs link)
  • passEmoji - Emoji to use for test pass (default is :ok_hand:)
  • failEmoji - Emoji to use for test failure (default is :bomb:)
  • failuresOnly - Whether to only report failures (default is false)

via Command-line

$ mocha test --reporter mocha-ci-slack-reporter --reporter-options username=name,channel=#channel_name,...

via API

var mocha = new Mocha({ reporter: 'mocha-ci-slack-reporter', reporterOptions: { url: 'https://hooks.slack.com/...', username: 'reporter', channel: '#mychannel', logsUrl: 'https://ci.com/project/...' } });

License

MIT - see LICENSE.md

Keywords

FAQs

Last updated on 02 Dec 2016

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • 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