Search⌘ K
AI Features

Setting Up Your Test Suite

Discover how to establish a reliable test suite for your Elixir macros, including setting up test files and running tests with ExUnit. This lesson shows you ways to confidently validate macro-generated code and maintain your libraries.

We'll cover the following...

The test suite

Any good library is only as reliable as the test suite behind it. We’ve written our own language features and a couple of essential application libraries in the previous chapters. We even saw how macros let us create an expressive test framework. What we haven’t learned yet is how to test macros themselves and the code generation they perform.

In this lesson, we’ll ...