Open sheremet-va opened 1 month ago
I'm not sure if this should be part of the core. Or at least it should be marked as very-very experimental all the time.
Comparing images is very hard. There are companies building products that especially focus on this, and using those can be expensive. Open source tools like jest-image-snapshot
and cypress-image-snapshot
(that use pixelmatch
) are very flaky, especially when comparing images that are generated on different operating systems. For example pixel-by-pixel comparison fails in as simple cases as rendering fonts.
If we can find a way to implement this confidently then I'm all in. 👍
@JessicaSachs any thoughts? Do you have experience on this area?
Clear and concise description of the problem
There is no built-in way to compare images in the browser mode.
Suggested solution
Implement a snapshot-style assertion to compare previously stored images. I am open to API ideas.
This issue is opened to start a discussion around the topic.
Alternative
No response
Additional context
Consider using https://github.com/mapbox/pixelmatch as it is small and fast
Validations