Summary
That does it for unit-testing a React application, for now. We still don't have an example of testing some kind of input. Try to test and implement a CreateSpeakerPage
. What would you need to do from a React standpoint? What would Redux cause you to do? In this chapter, we have attacked the React components as if they were components. For display-only components, which is what these have been, this approach is probably better. However, for a component with some real functionality, you might want to try testing the functionality as a plain old JavaScript class before even attaching it to React. We also left quite a bit of work for you to do in this chapter. Don't be shy about looking at the source related to this chapter if you get lost or need a hint while you are filling in the blanks to complete the code.