Test passes

As this example pinpointed, your code might run correctly in some cases, but fail in others. Unit testing can pinpoint errors in your logic that you might not see readily. This is especially important when adding new features and/or fixing bugs. It is highly recommended that you create new tests for both, and then you will know at least at a minimum that your new or modified code is behaving properly after you make any code changes.

Let's switch gears slightly, and look at the NativeScript testing framework; the Angular framework is pretty cool, but it has the nasty limitation of not having NativeScript framework calls available ...

Get NativeScript for Angular Mobile Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.