The Git tag for this section is customer-history-component.
The tests we write in this section will exercise logic in both the component and our reducer, including the saga. This integrated approach allows us to view the React component itself as the highest level of computation within the application. The new tests build on what we've already tested, and, at the same time, each one will remain small and independent.
This isn't the only way to test. For example, we could build a CustomerHistory component without the connection to Redux, and test that in isolation before gluing it and Redux together in another component.
- Create a new file, test/CustomerHistory.test.js, and add the following setup. We're going to break this setup into parts, as it's long! First up, our imports and our standard setup. We also mock relay...