Skip to content

"Snapshot Missing" when test does not have parent #245

Open
@seanpoulter

Description

@seanpoulter

Steps to Reproduce

Save the snapshot for:

it('', () => expect('test').toMatchSnapshot())

and reload the window. You'll see the "snapshot missing" message.

Snapshot in jest-editor-support will build the snapshot name adding the test prefix for tests without a parent. This changed in jestjs/jest#2857 but has not been fixed.

Expected Behavior

Snapshot is found.

Actual Behavior

Snapshot CodeLens shows "snapshot missing"

Suggested Changes

  • Integration test in Jest
  • Fix jest-editor-support
  • Integration test in this repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions