Skip to content

Commit

Permalink
coverage tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanWright committed Jun 15, 2016
1 parent 13de5b6 commit 8dc6af6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@
"karma-spec-reporter": "0.0.26",
"karma-webpack": "1.7.0",
"karma-phantomjs-launcher": "1.0.0",
"karma-coverage": "1.0.0",
"karma-sourcemap-loader": "0.3.7",
"istanbul-instrumenter-loader": "0.2.0",
"phantomjs-prebuilt": "2.1.7",
"jasmine": "2.4.1",
"redux-actions-assertions": "1.1.0",
"redux-thunk": "2.1.0",
"expect": "1.20.1",
"babel-polyfill": "6.9.1",

"paraviewweb": "1.6.0",
"simput": "1.2.0",
"pvw-visualizer": "1.0.11",
Expand Down
16 changes: 11 additions & 5 deletions test/karma.redux.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,26 @@ module.exports = function(config) {
singleRun: true,
frameworks: ['jasmine'],
browsers: ['PhantomJS'],
reporters: ['spec'],
reporters: ['spec', 'coverage'],
plugins: [
'karma-jasmine',
'karma-phantomjs-launcher',
'karma-spec-reporter',
'karma-webpack',
'karma-coverage',
'karma-sourcemap-loader',
],
preprocessors: {
'tests.webpack.js': ['webpack'],
},
webpack: wpConfig,
files: [
'../node_modules/babel-polyfill/dist/polyfill.js',
'tests.webpack.js'
],
preprocessors: {
'tests.webpack.js': ['webpack', 'sourcemap'],
},
webpack: wpConfig,
coverageReporter: {
type: 'html',
dir: 'coverage/',
}
});
};
11 changes: 9 additions & 2 deletions test/webpack.redux.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,15 @@ module.exports = {
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel?presets[]=es2015,presets[]=react',
}
]
},
],
postLoaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'istanbul-instrumenter',
},
],
},
resolve: {
alias: {
Expand Down

0 comments on commit 8dc6af6

Please sign in to comment.