←back to thread

Unit tests as documentation

(www.thecoder.cafe)
94 points thunderbong | 1 comments | | HN request time: 0.354s | source
1. valenterry ◴[] No.41875719[source]
Okay, I'll go with it: statically defined types are also documentation!

And the method names are equivalent to the test names. Of course, only if you don't wildly throw around exceptions or return null (without indicating it clearly in the type signature).