Open JanBednarik opened 6 years ago
This was v surprising behavior.
Are there other similar libraries that share this? I haven't come across one
Are there other similar libraries that share this? I haven't come across one
https://github.com/facebook/jest does this as well, first run will create the baseline. Given we hopefully all use VCS I personally think the behaviour is okay.
The current behaviour mimics jest behaviour which is pretty fine if you follow this workflow:
When I create snapshot for the first time I have no idea what was saved in snapshot. If it's right or wrong. SnapshotTest assumes that first snapshot is always right. But user should decide. It should be considered wrong until user explicitly checks it in test report and confirms it (e.g. by
--snapshot-update
).