I am trying to configure Karma to use jasmine-jquery without success ...
In my karma.conf.js file , I configured the framework:
frameworks: ['jasmine'],
and downloaded the necessary dependencies:
files: [ '../bower_components/jquery/dist/jquery.js', '../bower_components/jasmine-jquery/lib/jasmine-jquery.js', ...
But when I run my test using the 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 doesn't seem to find a link to jasmine, probably because jasmine-jquery loads before jasmine:
351. beforeEach(function () { 352. jasmine.addMatchers({ 353. toHaveClass: function () {
Has anyone else encountered this problem? Is there any way to solve this?
source share