Getting issue while running the webpack in Jenkins
areddy7021 opened this issue · 2 comments
The webpack tests are running with the coverage summary in my mac when i run nom test and the same way its not coming up with the jenkins console output while i run on jenkins server. Am i missing anything ? teh below is the one it shows in my mac
in jenkins
I have made my npm test command returning true always . I have tried both the ways , it never worked for me.
here is my karma conf
// Reference: http://karma-runner.github.io/0.12/config/configuration-file.html
module.exports = function karmaConfig (config) {
config.set({
frameworks: [
// Reference: https://github.com/karma-runner/karma-jasmine
// Set framework to jasmine
'jasmine'
],
reporters: [
// Reference: https://github.com/mlex/karma-spec-reporter
// Set reporter to print detailed results to console
'progress',
'verbose',
'dots',
// Reference: https://github.com/karma-runner/karma-coverage
// Output code coverage files
'coverage'
],
files: [
// Grab all files in the app folder that contain .spec.
//'src/tests.webpack.js'
'test/tests.webpack.js'
],
preprocessors: {
// Reference: http://webpack.github.io/docs/testing.html
// Reference: https://github.com/webpack/karma-webpack
// Convert files with webpack and load sourcemaps
'test/tests.webpack.js': ['webpack', 'sourcemap']
},
browsers: [
// Run tests using PhantomJS
'PhantomJS'
],
singleRun: true,
// Configure code coverage reporter
coverageReporter: {
dir: 'coverage/',
reporters: [
{type: 'text-summary'},
{type: 'html'}
]
},
webpack: require('./webpack.config'),
// Hide webpack build information from output
webpackMiddleware: {
noInfo: 'errors-only'
}
});
};
hi. sorry I can't reproduce this because I'm not using Jenkins. it may be a problem with karma-coverage reporter or something.
v1+ of this loader didn't work well with karma-coverage
, so I wrote this reporter instead that you can use as a replacement, which should solve the issues you were experiencing: https://github.com/mattlewis92/karma-coverage-istanbul-reporter