Unit Testing, Property Testing, Elixir Language, Elixirlang, Refactoring.
important at all. DocTests are documentation. It’s in the name. They aren’t tests at all, really. So before we refactor, can we write some unit tests that actually test the method? Let’s write some unit tests that test our invariants: Invariant 1: given a list (l) and an integer (k), the output