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
BUT when we prune we only pass the name of the TEST "works", and then check all snapshot names if they start with that test name. Because both works 1 and works 2 start with works we assume that they should remain in the file. This is wrong.
The text was updated successfully, but these errors were encountered:
It is not enough to just check prefix when pruning snapshots - because it will leave bunch of snapshots!
https://github.com/bahmutov/snap-shot-core/blob/master/src/prune.js#L25
Situation:
Imagine a test initially like this one
The snapshots saved will be
works 1
works 2
Then we remove the second snapshot, leaving
BUT when we prune we only pass the name of the TEST "works", and then check all snapshot names if they start with that test name. Because both
works 1
andworks 2
start withworks
we assume that they should remain in the file. This is wrong.The text was updated successfully, but these errors were encountered: