a Karma reporter plugin for
report
andprettify
TAP test results
npm install karma karma-tap karma-tap-pretty-reporter --save-dev
npm install faucet --save-dev
Add karma.conf.js
file to project.
Example:
// karma.conf.js
module.exports = function(config) {
config.set({
reporters: ['tap-pretty'],
tapReporter: {
prettify: require('faucet'), // default 'standard TAP' output
separator: '****************************'
},
});
};
On Karma autoWatch
mode maybe we need separate test run cycles output. Create a separator
string for this purpose.
In order of not pollute output,
separator
will be shown only if LogLevel is different ofLOG_INFO
norLOG_DEBUG
Optionally you can save report to a file and turn off output to the console.
// karma.conf.js
reporters: ['tap-pretty'],
tapReporter: {
outputFile: './test.out.tap',
disableStdout: true // default 'false'
},
Install tap-difflet
package
npm install tap-difflet --save-dev
Add settings to tapReporter
on karma.conf.js
tapReporter: {
// outputFile: './unit.tap',
prettify: function() { return require('tap-difflet')({ pessimistic: true }); },
separator: '****************************',
},
- bySabi Files <> @bySabi
- Rostyslav Diachok <> @infernalmaster
- VitProg <> @VitProg
- wesley luyten <> @luwes
- Documentation improvement
- Feel free to send any PR