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

[Jest] Snapshot serializer not working #886

Open
dkozar opened this issue Aug 19, 2022 · 1 comment
Open

[Jest] Snapshot serializer not working #886

dkozar opened this issue Aug 19, 2022 · 1 comment
Labels
Needs reproduction question Further information is requested

Comments

@dkozar
Copy link

dkozar commented Aug 19, 2022

Hi,

I have the following snapshot serializer:

image

I've set it up (globally), so Jest uses it when unit tests are running:

image

It works nicely with render() method of @testing-library/react:

image

However, with renderHook(), it seems to not working:

image

It doesn't help if I target the className attribute instead of class:

image

Question: What do I have to do so react-hooks-testing-library uses the snapshot serializer?

@joshuaellis joshuaellis added question Further information is requested Needs reproduction labels Sep 7, 2022
@joshuaellis
Copy link
Member

This needs a proper reproduction with no redactions for us to correctly investigate please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs reproduction question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants