4 ms·
I find it makes sense if you can write the tests at a high enough level and the tooling to mock the "outside world" of your system is easy enough to use. If yo
by pydry 5y ago
I find it makes sense if you can write the tests at a high enough level and the tooling to mock the "outside world" of your system is easy enough to use.
If you're doing TDD exclusively with unit tests I find it falls flat for pretty much everything except complex, logical code with no state and simple inputs and outputs.
Likewise I tried doing TDD on code which had complex, hard to mock interfaces to the outside world (e.g. interfacing with a horrible oracle system) and it didnt exactly become impossible but it definitely stopped being worthwhile.
- eyelidlessness 5y ago> If you're doing TDD exclusively with unit tests I find it falls flat for pretty much everything except complex, logical code with no state and simple inputs and outputs. This is absolutely true. And it’s not a coincidence I embraced TDD at the same time I was learning FP. And I continue to generally prefer both TDD and a FP style no matter what stack I’m working in.