9

When one of your tests breaks, do you rewrite the test, or the code?

Usually I rewrote the test.

Comments
  • 1
    Rewriting the test beats the point of having tests though 😒
  • 5
    1. see why the test failed
    2. if the errorsource is my code, fix the code
    3. if is not the code debug the test.
  • 1
    The obvious choice is to start with looking at the code... Jumping right to changing the test is bad practice IMO
Add Comment