I am trying to configure Karma to use jasmine-jquery without success ...
In my karma.conf.js file I have configured the framework:
frameworks: ['jasmine'],
and have loaded the required dependencies:
files: [
'../bower_components/jquery/dist/jquery.js',
'../bower_components/jasmine-jquery/lib/jasmine-jquery.js',
...
But when I run my test using grunt test, I have the following:
TypeError: undefined is not a function
at null.<anonymous> (/home/sofarell/workspace/myapp/bower_components/jasmine-jquery/lib/jasmine-jquery.js:352:13)
Looking at the source code of jasmine-jquery.js, it looks like it's not finding the jasmine reference probably because jasmine-jquery is being loaded before jasmine:
351. beforeEach(function () {
352. jasmine.addMatchers({
353. toHaveClass: function () {
Anyone else has faced this problem? Is there a way to solve that?