Created
March 31, 2017 15:20
-
-
Save earnubs/17cc65228aa5313ab81c1a15d7a81abb to your computer and use it in GitHub Desktop.
mocha reporter without the solarized colour mayhem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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