Sometimes I deliberately add a mistake for testing in case everything works perfectly on the first run just to make sure it's actually working.

  • 1
    So you are testing the tests?
    But who tests the tester? 🤔
  • 2
    I've caught many test-helper bugs this way.
    Tests need to be both positive and negative ("x should happen if" + "x should not happen if not") or they're frequently ineffective.
  • 1
    @-red Yeah I do that also. Just like adding a new feature without updating the associated test case to see whether it fails now.
  • 2
    @Gregozor2121 careful! that's an infinite regress! don't go there or you'll get stuck on a loop til the end of time!!!!!
  • 1
    Yup always go for that too. If you can break it and all tests are green. Jasmine async code has a special place in my heart for always being green
Add Comment