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

retryTimes() generates a new snapshot on each retry #53

Open
Hypnosphi opened this issue Aug 28, 2023 · 0 comments
Open

retryTimes() generates a new snapshot on each retry #53

Hypnosphi opened this issue Aug 28, 2023 · 0 comments
Labels

Comments

@Hypnosphi
Copy link

jest.retryTimes(3)

describe('foo', () => {
  it('works', () => {
    expect(1).toMatchSpecificSnapshot('foo.snap')
    throw new Error()
  })
})

expected: only 1 snapshot is written
actual: each retry has its own snapshot

// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`foo works 1`] = `1`;

exports[`foo works 2`] = `1`;

exports[`foo works 3`] = `1`;

exports[`foo works 4`] = `1`;

related: jestjs/jest#7493

@igor-dv igor-dv added the bug label Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants