Logo Awesome React

Awesome React

Test a componentDidCatch ErrorBoundary component in React

How to test a React componentDidCatch lifecycle method.

Code: https://codesandbox.io/s/github/kentcdodds/react-testing-library-examples/tree/master/?module=%2Fsrc%2F__local_tests__%2Fcomponent-did-catch.js&previewwindow=tests&view=editor