Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created September 24, 2018 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save productioncoder/c5cde75df230fc9e9f9b27d15e10fdaa to your computer and use it in GitHub Desktop.
Save productioncoder/c5cde75df230fc9e9f9b27d15e10fdaa to your computer and use it in GitHub Desktop.
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