I can\'t make Karma working for directives that have external templates.
Here is my karma configuration file :
pr
This may not be your exact issue, but in our application we needed to add the following to karma.conf.js:
ngHtml2JsPreprocessor: {
cacheIdFromPath: function(filepath) {
return '/vision/assets/' + filepath;
}
}
The corresponding preprocessors setting looks like:
preprocessors: {
'views/**/*.html': 'html2js'
},
My understanding was that this was due to using absolute URLs in AngularJS when specifying templates - which karma was rewriting when running tests?
Anyway hope this helps.