Skip to content

Commit

Permalink
fix: mappedCoverage.addStatement is not a function (#500)
Browse files Browse the repository at this point in the history
When testing both original and transpiled sources it was possible for
mappedCoverage to be a FileCoverage instance when it needed to be a
MappedCoverage instance.

Fixes istanbuljs/nyc#940
  • Loading branch information
coreyfarrell committed Nov 15, 2019
1 parent 597234b commit d77cc14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/istanbul-lib-source-maps/lib/transformer.js
Expand Up @@ -119,7 +119,7 @@ class SourceMapTransformer {
} else {
uniqueFiles[getUniqueKey(file)] = {
file,
mappedCoverage: fc
mappedCoverage: new MappedCoverage(fc)
};
}
}
Expand Down

0 comments on commit d77cc14

Please sign in to comment.