Testing · Senior · Question 34 of 75

What does act() guarantee in React tests?

Explanation

The test environment must have IS_REACT_ACT_ENVIRONMENT = true (RTL sets it); otherwise React doesn't warn about missing act.

Further reading

Problem with a question

Testing · Senior · question 34

Test yourself

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

Take this quiz