mitsuhiko / insta

A snapshot testing library for rust
https://insta.rs
Apache License 2.0
2.07k stars 93 forks source link

Reconsider when to clear additional `.snap.new` files #492

Open max-sixty opened 1 month ago

max-sixty commented 1 month ago

Currently we can get the following sequence:

So because we have two processes running, we've managed to run cargo insta test --accept, missed an incorrect snapshot, and yet every process has reported success.

Should we instead only remove additional .snap.new files when running cargo insta review? Unlike cargo insta test --accept, that's running over every .snap.new file; it can't delete ones that relate to other tests. cargo insta test --accept can still remove .snap.new files for the tests it's running, but wouldn't for other tests.