Getting module is not defined
when trying to run angularJS unit tests.
I've narrowed down the problem to following issue: Karma is loading angular-mocks.js before it's loading Jasmine, but angular-mocks.js expects Jasmine to be there first.
How can I reorder my Karma file loads to ensure that Jasmine is loaded first?
Here's my karma config:
basePath = '../../../target';
frameworks = ['jasmine'];
files = [
JASMINE,
JASMINE_ADAPTER,
'lib/angular.min.js',
'lib/angular-mocks.js',
'main/js/**/*.js',
'test/js/**/*.js',
];
Versions:
- angular (and angular mocks) - 1.0.6
- karma - 0.8.5
ANGULAR_SCENARIO
andANGULAR_SCENARIO_ADAPTER
? In mykarma.conf.js
I load them in this order:ANGULAR_SCENARIO, ANGULAR_SCENARIO_ADAPTER, 'http://code.angularjs.org/1.0.6/angular-mocks.js', 'test/scenarios/*.js'
. - the-lay