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

Clarify what "unique customSnapshotIdentifier" means when using with jest.retryTimes() #348

Open
mihkeleidast opened this issue Feb 21, 2024 · 0 comments

Comments

@mihkeleidast
Copy link

When using jest.retryTimes, toMatchImageSnapshot fails if there is no custom customSnapshotIdentifier configured. However, I don't really understand what the docs mean in this case in terms of "uniqueness".

For example, if I define it like this:

customSnapshotIdentifier: (options) => {
    return `${options.defaultIdentifier}-snap`;
}

which is effectively the same as the default snapshot identifier, I get past the thrown error, and it seems to work OK. So why does it need to be configured at all?

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

No branches or pull requests

1 participant