Setting up Jasmine

Jasmine does not depend on any other JavaScript frameworks. It is available as a standalone release at https://github.com/jasmine/jasmine/releases. We are going to pick a stable version, for example, v2.3.0 for this chapter. We can download a ZIP file of standalone release, which we need to extract and use. After extraction, the folder structure looks like this:

Setting up Jasmine

In the lib folder, we require the CSS and JS files to be included.

We have seen test runners for many tools so far, Jasmine has SpecRunner. We will see how it looks later in this chapter when we will run our tests.

Get Test-Driven JavaScript 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.