How do you apply Test-Driven Development to change the behavior of existing code or fix a bug?
The same way as you do to write new code: by using the tests’ feedback to identify the changes to make.
When updating existing behavior, you can start by editing its tests. If you have a bug to fix instead, you first write a failing test that reproduces it and then make the test pass to fix it.
Fixing Bugs Driven by Tests
The early feedback from the beta testers reported a bug in the app. After submitting an order, customers still see the checkout button, making them ...