Skip to content

[Jest] Snapshot serializer not working #886

@dkozar

Description

@dkozar

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions