Trying to set up the Karma test runner for my Angular project, but running into a persistent error:
Error: [$injector:nomod] Module 'app.auth' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
All my .js
files are located in a scripts folder as directed by my karma.conf.js
, but the error persists.
Here is a snippet of my karma.conf.js
file:
module.exports = function(config) {
config.set({
basePath: '.',
frameworks: ['mocha'],
files: [
'../bower_components/angular/angular.js',
'../bower_components/jquery/dist/jquery.js',
'../bower_components/angular-mocks/angular-mocks.js',
'../scripts/app.module.js',
'../scripts/**/*.js',
'./unit/*.js'
],
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
concurrency: Infinity
})
}
Any insights on what might be causing this issue would be greatly appreciated.
Thank you for your help!