Investing in Testing
At icanmakeitbetter, we have a test-heavy philosophy that strongly embraces this fundamental rule:
-
Test all of your code with pretty, isolated, fast tests.
That’s a dense sentence. Let’s break it down.
-
Test all of your code: we do test every single line we write, and we measure that coverage in Elixir with coveralls.[24] If a line of code is worth writing, it’s worth testing.
-
with pretty: we believe test cases should be first-class citizens. Because we write so many tests, every single tick of punctuation counts, and the vocabulary we choose is important to us. Tests are stories, and should read like them.
-
isolated, fast tests: we believe isolated tests are easier to maintain. Setup code should be isolated, too. Isolated ...
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