3 ms·
> * unit tests are superb documentary as every dev can see how it is used and how it works at runtime Unit tests tell me how the code is supposed to behave giv
by godshatter 5y ago
> * unit tests are superb documentary as every dev can see how it is used and how it works at runtime
Unit tests tell me how the code is supposed to behave given certain inputs, but without a statement of what the function is trying to accomplish I can't tell if any necessary unit tests are missing. Or if any are just accidentally working.
- verinus 5y agotrue. But (hopefully) most of the time good naming, parameters and return types and the context of the library does that. But you are right, esp. complex methods or APIs require lots of documentation- but tbh I doubt it is in sources...