Confused about render-result-naming-convention #872
-
| I'm trying to use  And I get an error on this line: 
 When I try destructuring I get an error when trying to use  
 Which seems to suggest that I use  Then I try naming it  Which is odd because I'm not even destructuring. Using  What I'm missing? | 
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
| 
 The ideal way of rendering and querying would be: import { render, screen } from '@testing-library/react'
render(<MyComponent />)
expect(screen.getByLabelText('Whatever')).toBeInTheDocument() | 
Beta Was this translation helpful? Give feedback.
screenis an object containing all the queries, exported by Testing Library.The ideal way of rendering and querying would be: