Skip to main content

Comparison to other tools

How does this compare to (insert tool here)?​

enzyme shallow​

Enzyme shallow works great for react class components but doesn't support the full set of hooks necessary to build stateful functional components.

enzyme mount and react-testing-library​

These tools allow testing components and hooks but they:

  1. Require a dom emulator. This makes tests run very slowly compared to tests that use isolate-react.
  2. Require testing all rendered components. This is sometimes desirable but often is not. isolate-react allows you to test a single component in isolation, or to test multiple components together -- it's up to you.

cypress, selenium, etc.​

Cypress and similar tools are used for acceptance testing. isolate-react facilitates isolated testing of a single component (unit testing) or a small set of components. Acceptance testing is orthogonal to unit testing -- you can do either or both.