O'Reilly logo

Mastering ArcGIS Server Development with JavaScript by Ken Doman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Jasmine testing framework

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.

Writing tests for Jasmine

Once we have the SpecRunner in place, it's time to write tests. Tests are written using normal JavaScript logic ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required