Closed markussiebert closed 2 years ago
Hey :wave:, thanks for raising this issue and for the really helpful and thorough explanation with examples of what's the problem.
Maybe you have an idea what's wrong? Further testing showed, that replacing "-----" with "" is a possible workaround
The problem is the snapshots are saved in the file as
[ test name - id] <- marking start of snapshot
<data>
--- <- marking end of snapshot
So inside your test you had ---
breaking the logic :sweat: . Going to have a pr asap fixing this issue
Thank you for your fast answer. Don't feel presured ;-) My workaround with replacing the ----
works well. The other problem is not so easy to fix for me.
Hi,
coming from typescript and jest I really like your work and can save a lot of lines of code in my unit tests! But I have an edge case where the snapshot/match logic does not work.
This is the initial snapshot:
The second run already fails:
An image can tell more than thousand words:
And after updating the snapshot 2 more times, the snapshot looks like:
So I think something within this line is breaking the snapshot/diff logic:
Maybe you have an idea what's wrong?
Further testing showed, that replacing "-----" with "" is a possible workaround