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

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

Closed
espipj opened this issue Mar 11, 2021 · 4 comments · Fixed by #298
Closed

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

espipj opened this issue Mar 11, 2021 · 4 comments · Fixed by #298

Comments

@espipj
Copy link

espipj commented Mar 11, 2021

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

  • reference: the reference snapshots (these would be there already)
  • current: the current screenshots/snapshots as they are in the current app
  • diff: if there are differencies the diff image
    I think this might be related to Need actual image as a seperate image #252
    I am happy to contribute to this, I might need some help/guidance though 😃
@github-actions
Copy link

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

@JochenDiekenbrock
Copy link

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
Copy link

Etienne-M commented Nov 23, 2021

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
Copy link
Contributor

🎉 This issue has been resolved in version 5.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

5 participants