He continues to give me this error: "Module templates" are not available! You either mistakenly wrote the name of the module, or forgot to load it.
I implement unit testing directives in several Angular projects, and now it just doesn't work. Here is my karma.conf
module.exports = function(config){ config.set({ basePath : '../', files : [ 'webapp/lib/bower_components/angular/angular.js', 'webapp/lib/bower_components/angular-route/angular-route.js', 'webapp/lib/bower_components/angular-resource/angular-resource.js', 'webapp/lib/bower_components/angular-animate/angular-animate.js', 'webapp/lib/bower_components/angular-mocks/angular-mocks.js', 'webapp/lib/bower_components/jquery/jquery.js', 'webapp/lib/jasmine-jquery.js', 'webapp/js/components/**/*.html', 'webapp/app.js', 'webapp/js/**/*.js', 'test/unit/**/*.js', { pattern: 'webapp/stubs/*', watched: true, served: true, included: false } ], preprocessors: { 'webapp/js/components/**/*.html': ['ng-html2js'] //'webapp/components/**/.js' : ['coverage'] }, autoWatch : true, frameworks: ['jasmine'], browsers : ['Chrome'], plugins : [ 'karma-chrome-launcher', 'karma-firefox-launcher', 'karma-jasmine', 'karma-ng-html2js-preprocessor' ], junitReporter : { outputFile: 'test_out/unit.xml', suite: 'unit' }, ngHtm2JsPreprocessor: { moduleName: 'templates' } }); };
I am absolutely sure that there are .html files in this place. I double checked the instructions and just did not load: beforeEach(module('templates')); in the spec file.
Am I missing something? Probably: -)
- change: forgot 'js' in the path' webapp / js / components / ** / *. html 'still not working.