Skip to main content

Quiz: Testing React Components

Test what you learned in this lesson before moving on.

Lesson Quiz

Pass with 80% to complete this lesson.

1. Which query prefix should you use to assert that an element does NOT exist in the DOM?

2. Why should you prefer `userEvent` over `fireEvent` for simulating user interactions?

3. When testing a component that fetches data asynchronously, which query should you use to wait for the loaded content?