Build an Expense Manager App with React Native – Part 7

Testing Redux with Jest


Install redux-mock-store, this library will help us mock redux’s state in our tests.

We are not going to use react-test-renderer, instead add Enzyme:

We will use jest to implement tests for our redux state. In __tests__ folder, add spec files for each component we want to test. For example, test that the SplashScreen is rendered without crashing: