Babel compiles my modules to include the following line:
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
Which, in my best understanding, should deal with importing CommonJS .
How can I ignore this line because it is included in my coverage report? My coverage area usually depends on this line.
I was unable to add an inline ignore comment, for example /* istanbul ignore next */, because I cannot add it directly to this line. Adding a comment to the beginning of the file adds it before the class definition.
I also tried using the Babel secondaryCommentBefore option to add a comment before the compiled lines, but it adds it almost everywhere in the code, so it can be used.
Is there a way to ignore this line when analyzing coverage?
source
share