WebStorm - Karma and 3rd party JavaScript libraries

Hi,

I am using Karma and Jasmine for testing my WebStorm project.

My JavaScript files make use of Underscore and other 3rd party libraries, but these are undefined when I run the tests.

How do I configure Karma so that it references 3rd party libraries ?

Many thanks

1 comment
Comment actions Permalink

You need to put the corresponding files into your project directory and add them to your karma.conf.js, files[] property, to get them loaded and served by karma
See http://karma-runner.github.io/0.10/config/configuration-file.html

0

Please sign in to leave a comment.