Book Image

JavaScript Mobile Application Development

Book Image

JavaScript Mobile Application Development

Overview of this book

Table of Contents (15 chapters)
JavaScript Mobile Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Jasmine in action – developing Cordova app tests


Now, let's see Jasmine in action. In the following sections, we will illustrate a Cordova mobile app (weather application), which we will develop its tests using Jasmine. We will see how to test both the synchronous and asynchronous JavaScript code of the app, automate running our developed Jasmine tests using Karma, run our tests on the mobile device browser, generate test and code coverage reports, and finally, fully automate our tests by integrating our developed tests with CI tools.

An overview of the weather application

The main purpose of the weather application is to allow its users to know the current weather information of a specified place. It has two main views; the first view represents First Time login, which appears to the users for their first login time, as shown in the following screenshot:

Weather application's first time login

After entering the valid information and clicking on the Login button, the user will be forwarded to...