Skip to content

feat(prefer-find-by): report waitFor with presence matchers #420

Closed
@zaicevas

Description

@zaicevas

Originally mentioned in #411 (comment)

prefer-find-by could report presence matchers (.toBeInTheDocument(), toBeDefined(), etc) that are used in conjunction with RTL queries. Currently, prefer-find-by does not report such cases:

    await waitFor(() => screen.getByText('button')) // reported
    await waitFor(() => expect(screen.getByText('button')).toBeInTheDocument()) // not reported

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions