Unit Testing conclusion
The main focus of this book is UI and we've not had to write a great deal of hard logic or algorithms, so I just wanted to touch on Unit Testing so that you can consider it when you write your first app.
The key to successful Unit Testing is finding a way to implement it that suits you. There are many different approaches, such as test-driven development (TDD), which is where a developer would write the Unit Test first (which, in turn, would fail) and then write the function accordingly in order to make the test pass. Once the test passes, you could then refactor your code with the safe knowledge that any breaking changes would be picked up by your Unit Test.
Unit Tests can be really powerful, but you must remember ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access