Skip to content

Test how timer based updates should be tested in concurrent react

Notifications You must be signed in to change notification settings

eps1lon/react-concurrent-testing-timers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-concurrent-testing-timers

Explores how to test timer-based actions in React 18. See "Planned changes to act testing API" for more information.

real timers

Testing real timers currently has a misleading warning. When letting real timers run, React will issue warnings if an update was not wrapped in act. However, wrapping the real timer run inside act() will only flush the updates when exiting the act call. This makes it impossible to wait for a generic condition e.g. an element to appear.

About

Test how timer based updates should be tested in concurrent react

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published