Skip to main content

Component Tests

Component tests are tests of individual React Native components apart from where they are used in an application. You can create an instance of the component, pass it props, interact with it, and see how it behaves. This can make it quicker and easier to arrange edge cases that would be slow and difficult to set up with end-to-end tests.

React Native Testing Library allows you to test React Native components, verifying the component tree they render and allowing you to interact with them. jest-native provides custom matchers that make your tests more readable.

Questions or feedback?

Come chat with us in the #react-native-testing channel on CodingItWrong's Server for React and Testing.