I am testing an angularjs service that uses the lodash library. when I run the tests through karma-jasmine I get an error
ReferenceError: Can't find variable: _
Is there a way to configure karma/jasmine to use lodash?
Since you won't have a HTML file in your tests to load the script for you, you'll need to include the library in your karma config file in the
files property. You can read more about it here: http://karma-runner.github.io/1.0/config/files.html
It will look something like this
... files: [ 'path/to/lodash.js' ] ...
Hope that helps!