Testing · Middle · Question 4 of 75

What does the warning “An update to Component inside a test was not wrapped in act(...)” usually mean?

Explanation

RTL already wraps render and events in act. The fix is usually to wait for the final UI state with findBy/waitFor, not to add act manually.

Further reading

Problem with a question

Testing · Middle · question 4

Test yourself

Take the Testing · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz