A Simple suite spec reporter for Jasmine 2
Install jasmine-suite-reporter
using npm:
npm install jasmine-suite-reporter
To use the reporter with you node projects simply install and use the reporter as following:
const Jasmine = require('jasmine');
const suiteReporter = require('jasmine-suite-reporter');
var jasmine = new Jasmine();
//Optional override of the default reporter
jasmine.configureDefaultReporter({
print: function(){}
});
//Register Reporter
jasmine.addReporter(SuiteReporter.create({
includeStack: true
}));
//load configuration file
jasmine.loadConfigFile('config/file.json');
//Jasmine Start
jasmine.execute();
In your Protractor configuration file:
const suiteReporter = require('jasmine-suite-reporter');
exports.config = {
// your config settings ...
jasmineNodeOpts: {
//Remove default dot reporter
print: function() {}
},
onPrepare: function() {
var jasmineEnv = jasmine.getEnv();
//Adding custom reporter
jasmineEnv.addReporter(suiteReporter.create({
includeStack: true
}));
}
};
In your karma.conf.js file:
module.exports = function(config){
config.set({
// your config settings ...
reporters: ['suite'],
plugins: [
//your plugins...
'jasmine-suite-reporter/karma'
]
})
};