React · Senior · Question 61 of 75

What does a test warning "An update was not wrapped in act(...)" mean?

Explanation

Testing Library wraps its helpers in act already. The warning usually means a pending async update - use await findBy... or waitFor instead of synchronous queries.

Further reading

Problem with a question

React · Senior · question 61

Test yourself

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

Take this quiz