DEV Community

loading...

Discussion on: How I'm testing my custom React Hook with Enzyme and Jest

Collapse
mikeborozdin profile image
Mike Borozdin

If you want to use shallow rendering for unit testing components that rely on useEffect(), I suggest you use the jest-react-hooks-shallow library. It brings React Hooks, such as useEffect() to shallow rendering.