Jakub Zalas Profile picture
Software Engineer
May 17, 2022 22 tweets 5 min read
On granularity of tests focused on behaviour.

#tdd #bdd #testing #programming

🧵1/22 A function is one of the smallest units of behaviour. Given an input, it returns the output.

This means that given the context (input), the function's behaviour can be verified by calling the function and looking at the outcome (output).

🧵2/22 Pure function
May 2, 2022 17 tweets 5 min read
Why do I practice #tdd you ask?

There’s a number of paths I could’ve taken (or combinations of the four).

1) Write no automated tests.
2) Write tests before writing code.
3) Write tests at the same time as code.
4) Write tests after writing code.

🧵 Image On a project that’s worth practicing #DDDesign, having no tests is not an option. Continuous refactoring towards deeper insights is the foundation of #DDD and it’s too scary to refactor with no tests.