What Should We Test?
“What do we test?” is a question that Ash can help answer. Ultimately, every interface in Ash stems from our action definitions. This means that the vast majority of our testing should center around calling our actions and making assertions about the behavior and effects of those actions. We should still write tests for our API interfaces, but they don’t necessarily need to be comprehensive. One caveat to this is that if you’re developing a public API, you may want to be more rigorous in your testing. We’ll cover this in more detail shortly.
Additionally, Ash comes with tools and patterns that allow you to unit test various elements of your resource. Since an example is worth a thousand words, let’s use some of these tools. ...
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