I am having problems getting Istanbul to output it's HTML report to the directory specified in my Karma config. It currently outputs the main index.html in the correct directory(reports/coverage
) but the detailed html child pages are output to the same directory as the source file(www/js/...
). It is the same problem described here, but after trying the suggested solution the problem persists.
This is the contents of my karma config file:
basePath: '',
frameworks: ['jasmine'],
files: [
'../www/lib/angular/angular.js',
'../www/js/*.js',
'../www/js/services/*.js',
'../www/js/controllers/*.js',
'../www/lib/angular-mocks/angular-mocks.js',
'**/*test.js',
'test-data/*.json'
],
plugins: [
'karma-jasmine',
'karma-coverage',
'karma-phantomjs-launcher',
'karma-ng-json2js-preprocessor'
],
preprocessors: {
'../www/js/**/*.js': ['coverage'],
'**/*.json': ['ng-json2js']
},
ngJson2JsPreprocessor: {
stripPrefix: 'test-data/',
prependPrefix: 'served/'
},
reporters: ['progress', 'coverage'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['PhantomJS'],
singleRun: true,
coverageReporter: {
// Common output directory
dir: 'reports/coverage',
reporters: [
{ type: 'text-summary'},
{ type: 'html', subdir:'report-html' }
]
}
Suggestions on how to resolve this so all of the coverage files are placed into the reports/coverage
directory would be much appreciated. Thanks.
Aucun commentaire:
Enregistrer un commentaire