Powered by
This page is for an older version of Jasmine (2.0)
The current stable version of Jasmine is: 3.10 - You can also look at the docs for the next release: Edge


Using Jasmine with node

The Jasmine node package contains helper code for developing and running Jasmine tests for node-based projects.


You can install Jasmine using npm, locally in your project and globally to use the CLI tool.

npm install -D jasmine

npm install -g jasmine

Init a Project

Initialize a project for Jasmine by creating a spec directory and configuration json for you.

jasmine init


Customize spec/support/jasmine.json to enumerate the source files and spec files you would like the Jasmine runner to include. You may use dir glob strings.



Once you have set up your jasmine.json, you can start Jasmine by running jasmine.