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 ...

Get Functional Programming: A PragPub Anthology 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.