You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importReactfrom'react'importAppfrom'./App'it('renders without crashing',()=>{mockedRender(<App/>)})
has a number of errors like this:
console.error node_modules/react-dom/cjs/react-dom.development.js:88
Warning: An update to _default inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act
in _default (at App.js:61)
in header (at App.js:55)
in div (at App.js:54)
in _default (at App.test.js:5)
in ApolloProvider
in Unknown (at setupTests.js:47)
in Router (at setupTests.js:36)
in RouterWrapper (at setupTests.js:46)
in MockedWrapper
The text was updated successfully, but these errors were encountered:
How to fix this?
src/components/App.test.js
has a number of errors like this:
The text was updated successfully, but these errors were encountered: