If you'd like to define your own reporter in addition to the built-in ones (stdout and jUnit-xml) you can do so in two ways:
Define your reporter in a separate file, using the below interface, and then specify the path to the file using the --reporter
cli argument.
module.exports = {
write : function(results, options, done) {
done();
}
};
Add your reporter in the external globals file. Read more about external globals.
See the provided globalsModule.js for an example.
module.exports = {
reporter : function(results, done) {
console.log(results);
done();
}
};