DEV Community

Discussion on: Help me improve my unit tests

Collapse
 
meanin profile image
Paweł Ruciński

Hi, thanks for reply.

Referencing to point 1, I am aware of empty spacer approach. Still, I think, that it is easier to involve someone into TDD without any skills, when there is clear distinction between each section.

Collapse
 
alainvanhout profile image
Alain Van Hout

Fair enough. Within the context of a training exercise that's definitely an important factor. I was mostly talking about 'production code', where superfluous comments tend to decrease the signal-to-noise ratio (if ever so slightly).

That said, I strongly believe in the ability of (appropriately short) comments to add contextual information and remove potential misunderstanding, thereby increasing maintainability. And in the context of training, the AAA comments are exactly that.

Thread Thread
 
meanin profile image
Paweł Ruciński

Thanks again, I will keep that in my mind.

Very good point!