Settings

Theme

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

1 points by ilitirit 2 years ago · 2 comments · 1 min read


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.

beeeeerp 2 years ago

Yes, I find them valuable.

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

  • johnydoe 2 years ago

    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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection