DEV Community

Discussion on: React Best Practices

Collapse
 
pavermakov profile image
Pavel Ermakov

How do test components with hooks?

Collapse
 
awedis profile image
awedis

Check Jest & Enzyme Libraries, Both are specifically designed to test React applications :)

Collapse
 
jwhenry3 profile image
Justin Henry

There are some complex interactions that might be just outside of automated testing, so I personally use Storybook so I can manually test hard-to-reach edge cases.

This especially helps when you need a sandbox of real-world state (like connecting to apis and websockets to run through production scenarios without impacting deployments or full-blown application e2e)