Skip to content

fix: support jest snapshot matchers with snapshot name#25

Merged
sparten11740 merged 5 commits intomainfrom
sparten11740/fix/jest-snapshots
Feb 19, 2025
Merged

fix: support jest snapshot matchers with snapshot name#25
sparten11740 merged 5 commits intomainfrom
sparten11740/fix/jest-snapshots

Conversation

@sparten11740
Copy link
Copy Markdown
Contributor

@sparten11740 sparten11740 commented Feb 17, 2025

Add support for passing a name to jest's snapshot matchers, e.g. expect(obj).toMatchSnapshot('some snapshot name').

Fixes #22

@sparten11740 sparten11740 merged commit ad63b5e into main Feb 19, 2025
Copy link
Copy Markdown
Collaborator

@ChALkeR ChALkeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nACK, tests in tests/jest subdir should pass on Jest, this doesn't

@ChALkeR
Copy link
Copy Markdown
Collaborator

ChALkeR commented Mar 23, 2025

Will file a fix

@sparten11740
Copy link
Copy Markdown
Contributor Author

What do you mean? Why is that not run in the CI then?

@ChALkeR
Copy link
Copy Markdown
Collaborator

ChALkeR commented Mar 23, 2025

@sparten11740 you are right, we should ensure that Jest runs on tests in the tests/jest subdir or this can happen again

#26 is a fix for the issue here (and an explanation), and #27 is the path forward

@ChALkeR
Copy link
Copy Markdown
Collaborator

ChALkeR commented Mar 24, 2025

Why is that not run in the CI then?

Fixed in #29

@ChALkeR ChALkeR mentioned this pull request Apr 8, 2025
1 task
@ChALkeR ChALkeR deleted the sparten11740/fix/jest-snapshots branch April 9, 2025 05:01
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

Successfully merging this pull request may close these issues.

jest extended snapshot matchers don't work with snapshot name

3 participants