-
Book Overview & Buying
-
Table Of Contents
Mastering ArcGIS Server Development with JavaScript
By :
If you're looking for a simple BDD framework to test your application, Jasmine might have what you need. Jasmine is a framework-independent BDD library that can be used to run tests on JavaScript applications. It can either be installed through Node.js, or the library can be downloaded and copied to the test project folder.
Jasmine loads its test in an HTML file called a SpecRunner (short for specifications runner). This page loads the main Jasmine library, as well as all the user libraries and unit tests. Once loaded, the Jasmine library runs tests in the browser and displays the results.
Once we have the SpecRunner in place, it's time to write tests. Tests are written using normal JavaScript logic and a few testing objects and methods provided by Jasmine. Let's look at some of the different parts.
Jasmine tests are organized by suites, specs, and tests. Suites make up the top level, and describe...
Change the font size
Change margin width
Change background colour