Skip to content

Commit

Permalink
Merge pull request #1415 from Gnafu/fix_coverage
Browse files Browse the repository at this point in the history
Instrument code before babel. Fixes #56
  • Loading branch information
Gnafu authored Jan 31, 2017
2 parents d70b92b + 5adc387 commit ed5abc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions karma.conf.single-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ module.exports = function karmaConfig(config) {
webpack: {
devtool: 'eval',
module: {
preLoaders: [
{
test: /\.jsx?$/,
exclude: /(__tests__|node_modules|legacy|libs\\Cesium|libs\\html2canvas)\\|(__tests__|node_modules|legacy|libs\/Cesium|libs\/html2canvas)\/|webpack\.js|utils\/(openlayers|leaflet)/,
loader: 'babel-istanbul'
}
],
loaders: [
{ test: /\.jsx?$/, exclude: /(ol\.js$|node_modules)/, loader: 'babel-loader', include: path.join(__dirname, "web", "client") },
{ test: /\.css$/, loader: 'style!css'},
{ test: /\.less$/, loader: "style!css!less-loader" },
{ test: /\.woff(2)?(\?v=[0-9].[0-9].[0-9])?$/, loader: "url-loader?mimetype=application/font-woff" },
{ test: /\.(ttf|eot|svg)(\?v=[0-9].[0-9].[0-9])?$/, loader: "file-loader?name=[name].[ext]" },
{ test: /\.(png|jpg|gif|svg)$/, loader: 'url-loader?name=[path][name].[ext]&limit=8192'} // inline base64 URLs for <=8k images, direct URLs for the rest
],
postLoaders: [
{
test: /\.jsx?$/,
exclude: /(__tests__|node_modules|legacy|libs\\Cesium|libs\\html2canvas)\\|(__tests__|node_modules|legacy|libs\/Cesium|libs\/html2canvas)\/|webpack\.js|utils\/(openlayers|leaflet)/,
loader: 'istanbul-instrumenter'
}
]
},
resolve: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"devDependencies": {
"babel-core": "6.8.0",
"babel-eslint": "4.1.8",
"babel-istanbul-loader": "^0.1.0",
"babel-loader": "6.2.4",
"babel-plugin-add-module-exports": "0.1.4",
"babel-plugin-object-assign": "1.2.1",
Expand Down

0 comments on commit ed5abc6

Please sign in to comment.