Summary
In this chapter, you learned how to use two types of HTML form elements: select boxes and radio buttons.
The component we’ve built has a decent amount of complexity, mainly due to the component hierarchy that’s used to display a calendar view, but also because of the date and time functions we’ve needed to help display that view.
That is about as complex as it gets: writing React component tests shouldn’t feel any more difficult than it has in this chapter.
Taking a moment to review our tests, the biggest issue we have is the use of expect.hasAssertions
and the unusual Arrange-Assert-Act order. In Chapter 6, Exploring Test Doubles, we’ll discover how we can simplify these tests and get them back into Arrange-Act-Assert order.