Testing · Junior · Question 42 of 78
What does render from React Testing Library do?
- ✓Correct answer: Renders a component into a container attached to
document.bodyin the test environment - 2Takes a screenshot of the component
- 3Renders the component to an HTML string on the server
Explanation
After each test RTL unmounts the component automatically (cleanup), if the runner exposes a global afterEach.