-
Notifications
You must be signed in to change notification settings - Fork 152
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
When returning a RenderResult
from a function, some destructured methods are caught by the linter, but others aren't.
it('displays a loader', () => {
const { getByText, debug } = render(<MyLoader />);
getByText('Loading'); // Caught by linter
debug(); // Caught by linter
});
it('displays a loader', () => {
function renderLoader(): RenderResult {
return render(<MyLoader />);
}
const { getByText, debug } = renderLoader();
getByText('Loading'); // Caught by linter
debug(); // Linter doesn't care
});
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working