How to refactor your Swift code using TDD

Are you sold on the benefits of unit testing and TDD but stuck trying to introduce it into your code base? With today’s video, you’ll learn how to use TDD to reduce duplication and refactor a class to make it easier to maintain. You’ll notice that TDD helps to evolve the design of the code and improve the overall structure, making it easier to maintain in the future. And unit tests that run frequently also give us confidence that the code will continue to do as we expect.

And now that you have a few tests, you can view your test coverage reports to see how much of your production code is tested.