|
|
|
|
|
by hitchstory
495 days ago
|
|
Well ok...but then what kind of code doesnt it fit well? Almost every user story I follow in production code follows the form of given/when/then scenario which can always be transformed into a test of some kind (e2e, integration, sometimes even unit). Where it's something like "do x, y and z and then a graph appears" I find TDD with a snapshot test with, say, playwright works best. |
|
If you're using snapshot tests (a technique I really like) surely you can't write the tests before the implementation, because you need the implementation in order to generate the snapshot?
(This is what I hate about the term TDD: sometimes it means test-first, sometimes it doesn't - which leads to frustrating conversations where people are talking past each other.)