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
with nextest, cargo insta approve only writes back changes for a single test. the repro steps have to be repeated 8-9 times until all dirty changes disappear from the git repo.
presumably because nextest runs each test in its own process and pending-snaps gets overwritten by each process.
change all snapshots in tests/acceptance.rs by a character or so
INSTA_FORCE_PASS=1 cargo nextest run
cargo insta approve
Insta Version
1.15.0
rustc Version
rustc 1.64.0-nightly
What did you expect?
one invocation of cargo insta approve should've captured all snapshot changes from all tests and approven them at once, undoing all uncommitted changes.
I wonder if .pending-snaps could:
become append-only (i.e. insta acquires a file lock and appends instead of overwriting file)
each entry contain hash of old/new snapshot content, so insta approve knows whether a "pending snap" is still relevant or can be skipped
The text was updated successfully, but these errors were encountered:
What happened?
with nextest,
cargo insta approve
only writes back changes for a single test. the repro steps have to be repeated 8-9 times until all dirty changes disappear from the git repo.presumably because nextest runs each test in its own process and
pending-snaps
gets overwritten by each process.Reproduction steps
tests/acceptance.rs
by a character or soINSTA_FORCE_PASS=1 cargo nextest run
cargo insta approve
Insta Version
1.15.0
rustc Version
rustc 1.64.0-nightly
What did you expect?
one invocation of
cargo insta approve
should've captured all snapshot changes from all tests and approven them at once, undoing all uncommitted changes.I wonder if
.pending-snaps
could:insta approve
knows whether a "pending snap" is still relevant or can be skippedThe text was updated successfully, but these errors were encountered: