americanexpress / jest-image-snapshot

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

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

Closed eins78 closed 1 year ago

eins78 commented 1 year ago

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

Checklist:

What is the Impact to Developers Using Jest-Image-Snapshot?

oneamexbot commented 1 year ago

:tada: This PR is included in version 6.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: