It would be really useful to have customSnapshotsDir specified as function, in order to have much more flexibility over the way snapshots are stored, and make it possible to generate path on the fly depending on testPath, etc.
In my usecase, we have our own framework with our React components. There are many components, and I would like to get all the snapshots stored in the same directory, with a structure identical to that of the framework. Something that would look like this:
As suggested here in this issue https://github.com/americanexpress/jest-image-snapshot/issues/62
It would be really useful to have customSnapshotsDir specified as function, in order to have much more flexibility over the way snapshots are stored, and make it possible to generate path on the fly depending on testPath, etc.
In my usecase, we have our own framework with our React components. There are many components, and I would like to get all the snapshots stored in the same directory, with a structure identical to that of the framework. Something that would look like this:
A commit was submitted a few years ago : https://github.com/goverdhan07/jest-image-snapshot/commit/0277834beaef81107759f9ca84a4f84a50d74735
What do you think?