I often practice TDD when doing bug fixing. I would add a new test that simulates the filed bug with an expectation that it will fail.
I will then proceed to provide the fixes and once done I will rerun the test and this time expecting it to pass. Occasionally I would do the same in implementing new features provided there's a clear requirement of it.
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.