Jest needs to be told to use source maps with the mapCoverage: true in package.json or via --mapCoverage on the command line.
I also turned on external source maps in tsconfig.json as well.
--no-cache --ci
For yarn coverage, I turned off caching and other optimizations to go with a vanilla/from-scratch run. It's "safer" but slower.
Coverage Thresholds
Now that source maps work with jest, your coverage score went up! 🎉
I locked each of the scores in to what they are now. You can adjust these to your own goals and comfort levels in package.json > jest > coverageThreshold > global.
Coverage + Source Maps
Jest needs to be told to use source maps with the
mapCoverage: true
inpackage.json
or via--mapCoverage
on the command line.I also turned on external source maps in
tsconfig.json
as well.--no-cache --ci
For
yarn coverage
, I turned off caching and other optimizations to go with a vanilla/from-scratch run. It's "safer" but slower.Coverage Thresholds
Now that source maps work with jest, your coverage score went up! 🎉
I locked each of the scores in to what they are now. You can adjust these to your own goals and comfort levels in
package.json
>jest
>coverageThreshold
>global
.