Skip to content

Commit 4d25b11

Browse files
authored
Merge pull request #53 from JoelLarson/feature/fix-deprecated-coverage
Replace deprecated isparta-loader with istanbul-instrumenter-loader
2 parents 16d39b7 + 8ac51a5 commit 4d25b11

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"extract-text-webpack-plugin": "^1.0.1",
3434
"file-loader": "^0.9.0",
3535
"html-webpack-plugin": "^2.7.1",
36-
"isparta-loader": "^2.0.0",
36+
"istanbul-instrumenter-loader": "^1.0.0",
3737
"jasmine-core": "^2.3.4",
3838
"karma": "^1.1.0",
3939
"karma-coverage": "^1.0.0",

webpack.config.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,21 @@ module.exports = function makeWebpackConfig () {
119119
}]
120120
};
121121

122-
// ISPARTA LOADER
123-
// Reference: https://github.com/ColCh/isparta-instrumenter-loader
124-
// Instrument JS files with Isparta for subsequent code coverage reporting
125-
// Skips node_modules and files that end with .test.js
122+
// ISTANBUL LOADER
123+
// https://github.com/deepsweet/istanbul-instrumenter-loader
124+
// Instrument JS files with istanbul-lib-instrument for subsequent code coverage reporting
125+
// Skips node_modules and files that end with .test
126126
if (isTest) {
127127
config.module.preLoaders.push({
128128
test: /\.js$/,
129129
exclude: [
130130
/node_modules/,
131131
/\.spec\.js$/
132132
],
133-
loader: 'isparta-loader'
133+
loader: 'istanbul-instrumenter',
134+
query: {
135+
esModules: true
136+
}
134137
})
135138
}
136139

0 commit comments

Comments
 (0)