What is test-driven development? In short, it’s a development strategy in which you write your tests first, then your app code.
In other words, product requirements are turned into very specific test cases, and then the software is improved so that the tests pass.
This is the opposite of a workflow in which you write your app code first and then your tests second. To be clear, either of these approaches are far superior to not having any unit tests at all.