Ask HN: Devs: Do you find any value in Arrange, Act Assert comments in tests?

1 points by ilitirit ↗ HN
I personally consider them to be noise so I never use them. In fact I usually remove them if I come across them in files I'm working on. But I'm curious to hear about what I could potentially be missing with regards to their value.

2 comments

[ 3.3 ms ] story [ 12.1 ms ] thread
Yes, I find them valuable.

The quality of engineer varies wildly across my organization, so it at least gives tests some basic structure.

Same here, it gives me structure if the amount of arrange code is large. It also gives me structure when writing, as it can sometimes be very tempting to mix act and assert statements