What to test?

  • Focus on testing the external interface to your functions, to make easier to update the functions.

  • Strive to test each behaviour in one test.

  • Avoid testing simple code that you’re confident will work.

  • Always write a test when you discover a bug.