Commit 18343b7f authored by Robert Knight's avatar Robert Knight

Transform ES6 => ES5 after instrumenting code.

Running the code through Babelify before instrumenting it for code
coverage resulted in incorrect statement location metadata. See the
"statementMap" sections of the two files in
https://gist.github.com/robertknight/4ec0f2c3509af61c31ffd574fe16cb74

Since Isparta already supports ES6 internally, it can instrument the
original untranspiled source, the problem can be resolved by switching
the order of the transforms. See
https://github.com/karma-runner/karma-coverage/issues/157#issuecomment-302133802
parent 7604a92c
......@@ -62,7 +62,6 @@ module.exports = function(config) {
},
transform: [
'babelify',
'coffeeify',
istanbul({
ignore: [
......@@ -80,6 +79,7 @@ module.exports = function(config) {
// https://github.com/karma-runner/karma-coverage/issues/157
instrumenter: require('isparta'),
}),
'babelify',
],
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment