karma-coverage
karma-coverage copied to clipboard
Colors still output to text-summary file with colors:false set
I'm still seeing some escape characters when trying to output text-summary to a file with colors turned off...
module.exports = function(config) {
config.set({
basePath: '',
autoWatch: true,
frameworks: ['qunit'],
files: [
],
// list of files to exclude
exclude: [
],
// test results reporter to use
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
reporters: ['progress', 'coverage'],
preprocessors: {
'source/**/*.js': ['coverage']
},
plugins: [
// these plugins will be require() by Karma
'karma-coverage',
'karma-qunit',
'karma-phantomjs-launcher'
],
colors: false,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera (has to be installed with `npm install karma-opera-launcher`)
// - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
// - PhantomJS
// - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
browsers: ['PhantomJS'],
singleRun: false,
coverageReporter: {
type : 'text',
dir : 'coverage/',
file: 'coverage.txt'
}
});
};
@harking is this still an issue?
I can confirm that this is still an issue.
@dignifiedquire This is still an issue....
istanbul only suppresses color based on..
https://github.com/chalk/supports-color
which checks argv for --no-color
so.. you need to run karma with --no-color to get the saved text-summary to not contain colors.