|
|
|
|
|
by consteval
684 days ago
|
|
Tests only test functionality, they don't test business context. Comments explain business context. For example, "we have this conditional here because Business needs this requirement (...) satisfied for this customer" Your comment can test the logic works correctly. But someone coming in, without the comment, will say "why are we doing this? Is this a bug or intentional? Is the test bugged, too?" Now, they'll see it's intentional and understand what constraints the code was written under. Your test can't send a slack message to a business analyst and ask them if your understanding is correct. The original dev does that, and then leaves a comment explaining the "why". |
|