Closed weihanglo closed 4 months ago
I am not sure if this is a thing worth fixing in snapbox. To me an inline snapshot should not be shared. Who knows when those tests start diverging from each other.
For some of the tests I ran into this, it was intentional that the output is the same (post redactions) so I think its reasonable to fix.
When an inline snapshot is shared between different
#[test]
, it could be updated multiple times, causing the final updated snapshot being wrong.snapbox@=0.6.10
cargo 1.81.0-nightly (bc89bffa5 2024-06-22)
Here is a reproducible case using Cargo
-Zscript
:You can found snapbox has overwritten the expected string multiple times: