Skip to content

Instantly share code, notes, and snippets.

@earnubs
Created March 31, 2017 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save earnubs/17cc65228aa5313ab81c1a15d7a81abb to your computer and use it in GitHub Desktop.
Save earnubs/17cc65228aa5313ab81c1a15d7a81abb to your computer and use it in GitHub Desktop.
mocha reporter without the solarized colour mayhem
var mocha = require('mocha');
module.exports = MyReporter;
function MyReporter(runner) {
mocha.reporters.Base.call(this, runner);
var passes = 0;
var failures = 0;
runner.on('pass', function(test){
passes++;
//console.log('pass: %s', test.fullTitle());
});
runner.on('fail', function(test, err){
failures++;
console.log('🐋g FAIL: %s', test.fullTitle());
console.log('\n');
console.log(err);
console.log('\n\n');
});
runner.on('end', function(){
console.log('end: %d/%d', passes, passes + failures);
process.exit(failures);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment