Book Image

JavaScript Mobile Application Development

By : Saleh
Book Image

JavaScript Mobile Application Development

By: Saleh

Overview of this book

If you are a native mobile developer, with some familiarity with the common web technologies of JavaScript, CSS, and HTML, or if you are a web developer, then this learning guide will add great value and impact to your work. Learning how to develop mobile applications using Apache Cordova is of particular importance if you are looking to develop applications on a variety of different platforms efficiently.
Table of Contents (10 chapters)
9
Index

Configuring Jasmine


In order to configure Jasmine, the first step is to download the framework from https://github.com/pivotal/jasmine/tree/master/dist. In this download link, you will find the latest releases of the framework.

Note

At the time of writing this book, the latest release is v2.0 that we will use in this chapter.

After unpacking jasmine-standalone-2.0.0.zip, you will find the following directories and files, as shown in the following screenshot:

Jasmine Standalone 2.0 directories and files

The src directory contains the JavaScript source files that you want to test. The spec directory contains the JavaScript test files, while the SpecRunner.html file is the test cases' runner HTML file. The lib directory contains the framework files.

In order to make sure that everything is running okay, click on the SpecRunner.html file; you should see specs passing, as shown in the following screenshot:

Jasmine specs passing

Note that this structure is not rigid; we can modify it to serve the organization...