Automated tests play the role of code samples.
I'd like to emphasize this sentence, code samples are super helpful.
It even affects the whole design of a feature. Especially, when developing the API, first, and then the implementation, like how we do in TDD.
Good writing style, by the way. Thanks!