Skip to content

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

@jcampbell05

Description

@jcampbell05

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions