1×
Become a member
to unlock all features

Create egghead account to access 5000+ tutorials and resources from expert developers.

Create account
Autoplay

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

    jestJest

    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