Fix the "not wrapped in act(...)" warning with Jest fake timers

InstructorKent C. Dodds

Share this video with your friends

Send Tweet

There aren't many places you need to manually use act if you're using React Testing Library's async utilities, but if you're using fake timers, you need to manually use act to avoid missing bugs in your code.

In this lesson you'll learn how to identify the cause of act warnings and how to resolve them.

This is based on my blog post: Fix the "not wrapped in act(...)" warning