How to Unit Test an Ionic 2 Application



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:

Read full article...

Share on Google Plus

About www. codeandyou.com

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment