Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0


Installing Karma

First, make sure that Node.js is installed on your computer.

Install Karma using npm:

  • Globally

Open WebStorm’ built-in Terminal (on the main menu, choose Tools | Open Terminal) and run

Code Block
npm install -g karma

to install Karma into your global node_modules directory and create a symlink to its binary.

Image Removed

  • Locally

The recommended approach is to install Karma (and all the plugins your project needs) locally in the project's directory.

Use WebStorm’ built-in npm ( Image Removed on the toolbar or in Settings | JavaScript - | Node.js pageand NPM) search and install Karma for your project.


Code Block
npm install karma

Install karma-cli globally:

Use WebStorm’ built-in npm and search for karma-cli, add -g option before hitting Install for global installation.
Or use built-in Terminal to install karma-cli with:

Code Block
npm install -g karma-cli

Karma configuration

To run new tests with Karma, you need to have a Karma configuration file (learn more about it).



Note: WebStorm disables autoWatch in Karma configuration.
You can rerun your tests with the shortcut Alt+Shift+R on Windows and* {}Ctrl+Shift+R* Win/Linux or ctrl-cmd-R on Mac.
Click auto-test in the WebStorm Test Run window to enable automatic test rerun: The test will be run 10 seconds after your code was changed, if there are no syntax errors.