Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

"toHaveClass" with a set of elements #237

@husa

Description

@husa

If assertion has a set of elements in it, toHaveClass matcher will pass if at least one of them has required class.
That's because according to jQuery docs hasClass will determine whether any of the matched elements are assigned the given class.
What I think is expected behavior, that matcher should not pass if at least one element in a set doesn't have expected class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions