Description
Version
1.0.0-beta.29
Reproduction link
https://github.com/adi-zz/istanbul-snapshot-in-coverage-mode
Steps to reproduce
npm i
npm run test
What is expected?
npm run test
generates 2 snapshots, for the same component. The 2 generated snapshots are logged in the console when running npm run test
. The 2 generated snapshots should be identical.
What is actually happening?
When running jest in 'normal' mode, the generated snapshot is <div><h1>parent</h1> <child-stub items="1,string,() => true"></child-stub></div>
(as expected).
When running in jest 'coverage' mode, the generated snapshot is <div><h1>parent</h1> <child-stub items="1,string,() => { /* istanbul ignore next */ cov_13kzki4jl6.f[2] ; cov_13kzki4jl6.s[7] ; return true; }"></child-stub></div>
. For this reason, running jest in coverage mode will fail, because the snapshot is different.
Maybe the issue is related to #975.