Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

MCBrandenburg/mocha-slack-reporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mocha-slack-reporter

Mocha reporter that posts to Slack

Usage

Options

const reporterOptions = {
  username:   "MCBrandenburg",
  channel:    "#test",
  hook_url:   "team",
  failIcon:   ":warning:",
  passIcon:   ":smile:",
  endIcon:    ":bulb:",
  minimal:     true,
  failureOnly: true
}

minimal If true, complete stats and failures will be sent.

failureOnly If true only failures will be sent

Note: If both are true, will function like minimal

Running the reporter

const slackReporter = require('mocha-slack-reporter');
mocha.reporter(slackReporter, reporterOptions);
mocha.run(function(failures) {
  process.on("exit", function() {
    process.exit(failures);
  });
});

About

Mocha reporter that posts to Slack

Resources

License

Stars

Watchers

Forks

Packages

No packages published