mocha-ci-slack-reporter
Advanced tools
Weekly downloads
Readme
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.
$ npm install mocha-ci-slack-reporter
All options:
url
(mandatory) - Slack incoming webhook URLusername
(mandatory) - Username to post aschannel
(mandatory) - Channel to post tologsUrl
- 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
)$ mocha test --reporter mocha-ci-slack-reporter --reporter-options username=name,channel=#channel_name,...
var mocha = new Mocha({
reporter: 'mocha-ci-slack-reporter',
reporterOptions: {
url: 'https://hooks.slack.com/...',
username: 'reporter',
channel: '#mychannel',
logsUrl: 'https://ci.com/project/...'
}
});
MIT - see LICENSE.md
FAQs
Slack reporter for Mocha when running in CI environments
The npm package mocha-ci-slack-reporter receives a total of 237 weekly downloads. As such, mocha-ci-slack-reporter popularity was classified as not popular.
We found that mocha-ci-slack-reporter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.