File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -251,8 +251,6 @@ func examineSnaps(
251251 return nil , isDirty , err
252252 }
253253
254- var needsUpdating bool
255-
256254 registeredTests := occurrences (registry [snapPath ], count , snapshotOccurrenceFMT )
257255 s := snapshotScanner (f )
258256
@@ -267,7 +265,6 @@ func examineSnaps(
267265
268266 if ! registeredTests .Has (testID ) && ! testSkipped (testID , runOnly ) {
269267 obsoleteTests = append (obsoleteTests , testID )
270- needsUpdating = true
271268
272269 removeSnapshot (s )
273270 continue
@@ -297,7 +294,7 @@ func examineSnaps(
297294 // if we're not allowed to update anything, just capture if the snapshot
298295 // needs cleaning, and then continue to the next snapshot
299296 if ! shouldUpdate {
300- if needsUpdating || needsSorting {
297+ if len ( obsoleteTests ) > 0 || needsSorting {
301298 isDirty = true
302299 }
303300
You can’t perform that action at this time.
0 commit comments