Closed
Description
Rule prefer-screen-queries
is throwing false positives when a query is called from within
util:
import { render, within, screen } from 'react-testing-library';
// ...
render(<SomeComponent />);
const section = screen.getByTestId('some-id');
// this is fine but the rule complains about it.
const submit = within(section).getByText(/submit/i);