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

feat: allow configuration of postfix for received screenshots filename #328

Merged

Conversation

eins78
Copy link
Contributor

@eins78 eins78 commented Mar 30, 2023

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 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)
  • 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:

  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • My changes are in sync with the code style of this project.
  • 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?

no changes if the option is not used, it defaults to the previously hardcoded string: '-received'
@10xLaCroixDrinker 10xLaCroixDrinker merged commit bade294 into americanexpress:main Jul 25, 2023
oneamexbot added a commit that referenced this pull request Jul 25, 2023
# [6.2.0](v6.1.1...v6.2.0) (2023-07-25)

### Features

* allow configuration of postfix for received screenshots filename ([#328](#328)) ([bade294](bade294))
@oneamexbot
Copy link
Contributor

🎉 This PR is included in version 6.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@meck93 meck93 deleted the feat-received-postfix branch October 2, 2023 09:02
@meck93 meck93 restored the feat-received-postfix branch October 2, 2023 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants