You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 runningnpm 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.
The text was updated successfully, but these errors were encountered: