Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for before/after diff using image files #886

Open
jcampbell05 opened this issue Aug 28, 2024 · 1 comment
Open

Add support for before/after diff using image files #886

jcampbell05 opened this issue Aug 28, 2024 · 1 comment
Labels
feature request New feature or request

Comments

@jcampbell05
Copy link

Is your feature request related to a problem? Please describe.

By default we get a diff of the byte strings but that isn't the easiest way for comparing if an image looks the way you expect, I previously wrote a custom extension to allow syrupy to spit out an "after" PNG file if the current snapshot doesn't match like I am used to with other snapshot libraries.

Unfortunately the syrupy at the time was limited, required a lot of overriding of methods in the matcher and so it broke in later editions

Describe the solution you'd like

Ability for the latest snapshot that is failing to match to be written to a "file.after.png" file if it fails to match.

Describe alternatives you've considered

I previously implemented it in my own custom extension but it was fragile and broke when syrupy was upgraded, it ideally would be built in.

Additional context

@noahnu noahnu added the feature request New feature or request label Sep 7, 2024
@noahnu
Copy link
Collaborator

noahnu commented Sep 7, 2024

Could you share the code from the custom extension?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants