I'm not sure if mocha reporters work with Jasmine, but there are some other Jasmine reporters that work better than the default reporter.
You need to require jasmine-reporters. It's required to have it as a dependency. Then you can call any of Jasmine Reporters listed here in your onPrepare
function inside your protractor config object.
npm i --save-dev jasmine-reporters
Using TapReporter
for example. Do this inside your protractor.config.js
:
onPrepare: function() {
// The require statement must be down here, since jasmine-reporters
// needs jasmine to be in the global and protractor does not guarantee
// this until inside the onPrepare function.
require('jasmine-reporters');
jasmine.getEnv().addReporter(
new jasmine.TapReporter());
},
For Jasmine 2.x and Protractor >1.6
framework: "jasmine2",
onPrepare: function() {
// The require statement must be down here, since jasmine-reporters
// needs jasmine to be in the global and protractor does not guarantee
// this until inside the onPrepare function.
var TapReporter = require('jasmine-reporters').TapReporter;
jasmine.getEnv().addReporter(new TeamCityReporter());
}