How to Install and Configure Jasmine

Installing and running jasmine

If you’d like to run the examples locally, read ahead.

As a first step, install Node.js and npm.

Follow these steps to install and initialize Jasmine. Use the terminal below to run each of the following commands:

  • npm install --save-dev jasmine installs the Jasmine npm package.
  • mkdir spec creates a folder for Jasmine config.
  • npx jasmine init initializes a standard Jasmine folder structure and config file: spec/support/jasmine.json
  • npx jasmine runs Jasmine using npx.

Get hands-on with 1400+ tech skills courses.