Running the tests

Let's try testing the application; to run your tests, type the following command:

tns test android

Alternatively, you can run the following command:

tns test ios

This will start the testing, and you should see something like this:

Note that there is an ERROR on this screen; this is a false error. Basically, when the app finishes running its tests, it quits. Karma sees that the application has quit unexpectedly and logs it as an "ERROR" Disconnected. The import information is the line below the error, where it says Executed 2 of 2 SUCCESS. This means that it ran two different described tests (that is, our test.ts file and ...

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.