Reputation: 11374
I am about to use Karma to run my tests. However, it seems like the javascript files are being loaded in the wrong order.
This is where I load my files:
files: [
'vendor/angular.min.js',
'vendor/angular-mocks.js',
'app.js',
'modules/*.js',
'modules/*/*.js'
],
However, that results in the following error:
Chrome 35.0.1916 (Mac OS X 10.10.0) ERROR
Uncaught ReferenceError: AuthenticationModule is not defined
at /Applications/MAMP/htdocs/client/app/js/modules/authentication/AuthenticationController.js:1
I assume this is because AuthenticationModule.js is loaded after AuthenticationController.js. (They are placed in the same folder)
How can I load these files in the correct order, without having to type them in manually?
Upvotes: 1
Views: 617
Reputation: 11374
I used grunt-contrib-concat
to merge the files. Did the trick :-)
Upvotes: 1