Currently received screenshots are stored with the filename snapshotID + -received + .png.
This PR makes the -received part of this configurable.
Motivation and Context
I want to set it to "" (no prefix) to more easily update the baseline images in CI:
by outputting the received images to another directory using the options
storeReceivedOnFailure: true, updatePassedSnapshot: true, customReceivedDir: …,
it is possible to later update the baseline images without running jest again with the -u flag (which takes a very long time and just repeats work already done).
How Has This Been Tested?
In my project and a unit test
Types of Changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation (adding or updating documentation)
[ ] Dependency update
Checklist:
[x] My change requires a change to the documentation and I have updated the documentation accordingly.
[x] My changes are in sync with the code style of this project.
[x] There aren't any other open Pull Requests for the same issue/update.
[ ] These changes should be applied to a maintenance branch.
[ ] I have added the Apache 2.0 license header to any new files created.
What is the Impact to Developers Using Jest-Image-Snapshot?
Description
Currently received screenshots are stored with the filename
snapshotID
+-received
+.png
. This PR makes the-received
part of this configurable.Motivation and Context
I want to set it to
""
(no prefix) to more easily update the baseline images in CI: by outputting the received images to another directory using the optionsstoreReceivedOnFailure: true, updatePassedSnapshot: true, customReceivedDir: …
, it is possible to later update the baseline images without running jest again with the-u
flag (which takes a very long time and just repeats work already done).How Has This Been Tested?
In my project and a unit test
Types of Changes
Checklist:
What is the Impact to Developers Using Jest-Image-Snapshot?