Thursday, June 20, 2013

karma webstorm configuration

Versions : WebStorm 6.0.2, Karma 0.8.5

In this short post I'll just explain my WebStorm configuration to run my Karma tests inside WebStrom. It's quite simple but can be useful.

These steps assume you can already use karma start at the command line to start watching your project and run your tests. If you don't and wish I'd write a post on that, just let me know in the comments...

1 - Create a new Run configuration for Node.js.
2 - Set the Working Directory to your project root.
3 - Set Path to Node App JS File to the Karma executable.
Type which karma (or where start in Windows) at the command prompt to find Karma's location.
4 - Set Application Parameter to the value : start
5 - Click Ok.
6 - Select that config in the config drop down.
7 - Click run and see your Karma results right in WebStorm!

Have fun!

No comments:

Post a Comment