DEV Community

Discussion on: The Ultimate Irony When I First Avoided Tests

Collapse
 
ghost profile image
Ghost

And I also like them to be a sort of documentation, I usually end up commenting more about the intent in the test than in the code; almos like a tour of the code in the tests.

Why just say what something do when you can show it and prove it in the tests; I'm starting with Rust and like Python you can add automagically some comments to the docs. Documenting and testing, two birds.

And you make sure is not stale, because those are tests that have to work.