slack-mocha

Run mocha tests and report the results to a Slack Channel

Usage no npm install needed!

<script type="module">
  import slackMocha from 'https://cdn.skypack.dev/slack-mocha';
</script>

README

slack-mocha

A Mocha Utility/Reporter for Slack Reports the result of mochajs test to Slack.

Installation

npm install slack-mocha -g

Usage

Running

slackMocha -e <team> -o <token> -c <channel> -f <test file>

Options

-e, --team youteam.slack.com

-c, --channel The channel you want alerts to be posted to, no #.

-o, --token Your token (https://hooks.slack.com/services/something/something/token)

-f, --testFile The icon you want to display for successes.

-m, --minimal Will only display failures and stats of test run.

-a, --failureOnly Will only display failures.

Note: If minimal and failureOnly flag are both used, it will function like minimal