Test Elm Applications

Until now, you have focused on building Elm applications.

You can create your own applications with the Elm Architecture, scale applications with powerful patterns, debug and deploy applications rapidly, and integrate Elm with existing JavaScript projects. Elm’s type safety makes most of this possible with no bugs. But, bugs in your application’s business logic can still appear.

In this chapter , you will address this dilemma by testing Elm code. Testing ensures your code behaves as expected and keeps bugs from creeping in. You will use test-driven development and the elm-test package to create and test a date library. Next, you will test certain properties of the library without worrying about specific test cases via fuzz testing. Finally, you will test an Elm application that depends on the date library. Once you finish this chapter, you will be ready to test drive your own Elm code and applications to prevent bugs.