Test an Application
Earlier in this chapter, you learned about unit and integration testing. Fully testing Elm projects requires both types of testing. Unit tests ensure that functions behave correctly in isolation. Integration tests ensure that those functions work together as expected.
So far, you’ve focused on unit testing the AwesomeDate module. In this section, you will test an Elm application that uses it. You will use a combination of unit and integration tests to test the update and view functions. Let’s get started.
First, you need the application. Outside of your awesome-date directory, create a new directory called awesome-date-app. Copy the contents of the code/test-applications/awesome-date-app directory from this book’s code ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access