Closed
Description
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