Last active
August 29, 2015 14:18
-
-
Save jouni-kantola/8c12919d049b8b4b91fd to your computer and use it in GitHub Desktop.
mocha reporter for Asimov
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
function AsimovReporter(runner) { | |
var passes = 0, | |
failures = 0; | |
runner.on('pass', function(test) { | |
passes++; | |
console.log('##asimov-deploy[test="%s" pass="true"', test.fullTitle()); | |
}); | |
runner.on('fail', function(test, err) { | |
failures++; | |
console.log('##asimov-deploy[test="%s" pass="false" reason="%s"', test.fullTitle(), err.message); | |
}); | |
runner.on('end', function() { | |
console.log('end: %d/%d', passes, passes + failures); | |
process.exit(failures); | |
}); | |
} | |
module.exports = AsimovReporter; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment