2 ms·
I started liking this convention when I started considering the tests documentation. In my code, the first unit test for any function is always the simple commo
by Tuna-Fish 10y ago
I started liking this convention when I started considering the tests documentation. In my code, the first unit test for any function is always the simple common case, and having that right next to the function usually makes the code easier to read.
- steveklabnik 10y agoYou should move it to a documentation block, given that doc examples are also run as tests. Then your users can see them too. Win-win!