Now you’re able to bring much of your app under test. But adding unit tests is a lot of work. What purpose do they serve? Tests validate that the code does what the tests say it does, and unit tests are fast by definition. This fast validation makes refactoring possible. But refactoring is widely misunderstood.
In this chapter, you’ll learn what refactoring is and you’ll see some of the most common refactoring moves. Learning these moves will help you make changes to your own code safely and with confidence.