By - Josh Morony
Ok, confession time: up until now I haven’t been testing my apps. Well, not properly at least. Of course I play around with my apps and try them on different devices before submitting to the app store, but this is a pretty poor and inefficient testing process.
Unit testing on the other hand, is a very efficient testing process. Unit testing is where you take small testable chunks (units) of an application and test that they work properly. Essentially, you write code to automatically test your code for you.
Angular 2 and Ionic 2 are very modular by nature (i.e. most features in an Ionic 2 app are their own little independent components that work together with other components) so unit testing is quite easy to set up.
This obviously requires more development effort, as you need to write tests as well as the code itself. So why might we want to invest in doing that? The main benefits of adding unit tests to your application are: