jest-image-snapshot
jest-image-snapshot copied to clipboard
Interactive Snapshot Mode
In Jest 23, an interactive snapshot mode was added, allowing you to step through your failing JSON snapshots using -- -i
in the command line. Unfortunately, that command is not implemented in this library.
Is there any way to re-create that behavior in the library?
For instance, we could run the tests with npm test -- -i
and if one of my tests fail, it would pause the test suite, and pop up the picture from the diff_output
folder, thus showing the difference between the actual and the expected. Then the user could type u
to update the screenshot, or s
to skip that test, and not update the screenshot. On either decision, the pop-up would close, and the tests would resume.
This is clearly a nice-to-have feature, and would resolve issue #74 as well.
Hmm that would be interesting. Not sure what the best UX would be for popping up a diff though but definitely something to think about. Tbh I have not used the snapshot interactive mode in jest 23 too much so I’ll have to use it a bit and figure out how to fit Jest-image-snapshot into it.
@anescobar1991 @ThomasSimeroth Indeed, Jest provides a great API to extend the interactive mode CLI, you can find the docs here: https://jestjs.io/docs/en/watch-plugins
This issue is stale because it has been open 30 days with no activity. Remove no-issue-activity label or comment or this will be closed in 5 days.
This issue is stale because it has been open 30 days with no activity.