4 ms·
TDD means writing tests before code At a very high level: Write the most basic case and it will fail (no code written). Write code so the test passes. Now wr
by auspex 7y ago
TDD means writing tests before code
At a very high level:
Write the most basic case and it will fail (no code written). Write code so the test passes.
Now write another test that will fail. Then write code so that tests passes.
It forces you to write code in a way that is testable and you catch any regressions if previous tests fail.
In the end... you shouldn't.... write any code that isn't required to pass a test.
- kohtatsu 7y agoI figured the value of TDD was to settle on the higher-level functions and APIs before dealing with the nitty gritty.