xxxxxxxxxx
In Test Driven Development Tests are created before actual code.
Than developers run the (UNIT) tests and Tests fail (because there is no code)
Than developer Write the code to pass the tests and Run the tests again.
Tests will PASS, against MVP(minimum viable product) code.
lastly they REFACTOR YOUR CODE -> RE-DO ALL STEPS
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.