Skip to content

Access CSS class name after renderIntoDocument() #3666

@binarykitchen

Description

@binarykitchen

In my jest tests I'd like to verify the class names of the rendered elements. How can I do this best?

When I do TestUtils.renderIntoDocument(...), I get the react element in the dom. And then what? How can I access the CSS class from there?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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