Closed satazor closed 4 months ago
Hey :wave: UPDATE_SNAPS=true
should be the way.
UPDATE_SNAPS=clean
just removes obsolete snapshots. UPDATE_SNAPS=true
does both in one go. Are you noticing any issues with it? or haven't tried it?
Nevermind, you are right. It's already like you said, I had a mistake in my makefile. Thanks for the quick response.
🚀 Feature Proposal
Ability to update snapshots and clean obsolete in one go. Just like jest and vitest, when
-u
is used it not only update snapshots but also remove obsolete ones.Motivation
So that we don't have to run tests twice to do update an clean obsolete snapshots.
Example
One possibile solution is to deprecated
UPDATE_SNAPS
and allowGO_SNAPS
value to be a comma separated set of actions.GO_SNAPS=update
to update snapshotsGO_SNAPS=clean
to remove obsolete snapshotsGO_SNAPS=update,clean
to do both at the same timeThis is just one of the many solutions. Another one would be to keep
UPDATE_SNAPS
env var but we would need to find an alternative name toupdate
action since it's already in the env var name itself, mayberefresh
.