enzyme
wrap updates in act
To prepare a component for assertions, wrap the code rendering it and performing updates inside an
act()call. This makes your test run closer to how React works in the browser.
To prepare a component for assertions, wrap the code rendering it and performing updates inside an
act()call. This makes your test run closer to how React works in the browser.