`updatePassedSnapshot` updates all snapshot regardless of jest `--updatesnapshot` value
JeremyJonas opened this issue ยท 1 comments
JeremyJonas commented
jest-image-snapshot/src/diff-snapshot.js
Lines 151 to 153 in 4bad752
Expected Result
I expected updatePassedSnapshot
to only update "passed" snapshots when jest --updatesnapshot flag is present.
Current Result
When updatePassedSnapshot
is true, it will always update all snapshot, regardless of being enabled in jest.
Proposal
Only consider updatePassedSnapshot
if updateSnapshot
is also true, which I am assuming it aligned to jest flag.
const shouldUpdate = ({ pass, updateSnapshot, updatePassedSnapshot }) => updateSnapshot && (!pass || (pass && updatePassedSnapshot)
oneamexbot commented
๐ This issue has been resolved in version 6.1.1 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐