Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
App.test.js fails due to React router
console.error node_modules/prop-types/checkPropTypes.js:19
Warning: Failed context type: The context `router` is marked as required in `Switch`, but its value is `undefined`.
in Switch (at App.js:11)
in div (at AppLayout.js:7)
in AppLayout (at App.js:10)
in App (at App.test.js:7)
console.error node_modules/react-dom/cjs/react-dom.development.js:14389
The above error occurred in the <Switch> component:
in Switch (at App.js:11)
in div (at AppLayout.js:7)
in AppLayout (at App.js:10)
in App (at App.test.js:7)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment