That issue is caused by many updates inside Component.
I got the same issue, this would solve the issue.
await act( async () => mount(<App />));
More Related Contents:
- How to test a react component that is dependent on useContext hook?
- How to make Jest wait for all asynchronous code to finish execution before expecting an assertion
- how to change jest mock function return value in each test?
- How to fix missing dependency warning when using useEffect React Hook
- How to use `setState` callback on react hooks
- How to compare oldValues and newValues on React Hooks useEffect?
- How to use callback with useState hook in react [duplicate]
- Understanding the React Hooks ‘exhaustive-deps’ lint rule
- In useEffect, what’s the difference between providing no dependency array and an empty one?
- How to resolve “Cannot use import statement outside a module” in jest
- How to use throttle or debounce with React Hook?
- React useReducer async data fetch
- Cannot read property ‘history’ of undefined (useHistory hook of React Router 5)
- How to sync props to state using React hooks : setState()
- useNavigate() may be used only in the context of a component
- React Hooks: useEffect() is called twice even if an empty array is used as an argument
- React.useState does not reload state from props
- Recommended approach for route-based tests within routes of react-router
- React Hook “useState” is called in function “app” which is neither a React function component or a custom React Hook function
- React: useState or useRef?
- Lazy initial state – What it is and how to use it?
- React Hooks – Modified state not reflecting immediately
- How to set initial state for useState Hook in jest and enzyme?
- React hook rendering an extra time
- How do I set a timezone in my Jest config?
- How to test style for a React component attribute with Enzyme
- How to mock React component methods with jest and enzyme
- Property ‘value’ does not exist on type ‘never’. when use useRef hook in mui
- Passing array to useEffect dependency list
- jest: Test suite failed to run, SyntaxError: Unexpected token import