Tests Call the API as a User Would
Our test will deal with the entire Mastery API. This whole book has been building up to this point. This test will not exercise our code as an interior function might, rather, it will test the whole API as an end user of the dependency. If we’ve done our job well, we’ll be able to express the entire test in a few short pages of code.
Our plan is to cover tests for the overarching API, and then move on to more specific tests within the poncho project. In this chapter, we won’t provide an exhaustive test to cover every corner condition. Instead, we’ll give you the strategies you might use to meet the testing strategies you’re likely to face to build effective boundary tests. Let’s write the first test.
Test the ...
Get Designing Elixir Systems With OTP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.