americanexpress / jest-image-snapshot

✨ Jest matcher for image comparisons. Most commonly used for visual regression testing.
Apache License 2.0
3.81k stars 197 forks source link

Feature: New Option to save current snapshots in a separate folder #260

Closed espipj closed 2 years ago

espipj commented 3 years ago

When running the tests I would like jest-image-snapshot three different folders:

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity.

JochenDiekenbrock commented 3 years ago

I also have a need for this feature. The snapshots in the CI pipeline are always slightly different from snapshots I take on a local system. To update the snapshots now, I have to rename the snapshot, download the new snapshot file from CI, update the snapshot locally in git and start the CI pipeline again. It would be soo helpful, if the current screenshots were just available in a separate folder

Etienne-M commented 2 years ago

I would also need a feature like this. I love the tool, but it makes deliberate breaking change painful to update. You have to run the tests, see that some snapshots are wrong, look at the diff, realize the change is intended, delete the snapshot and run the tests again. For a small codebase, it might be feasible to know ahead of time which snapshots will fail and which will succeed. But as the codebase grows larger, you will inevitably forget some and have to run the tests twice.

EDIT: I want to add, if those tests are integrated into a CI pipeline (as they should), this can make a seemingly small change be very long to get through the development loop.

oneamexbot commented 2 years ago

:tada: This issue has been resolved in version 5.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: