javascript - Can't use jasmine-jquery matchers -


i using karma, jasmine, , attempting use of custom matchers jasmine-jquery provides test dom manipulation i'm doing.

i have following in karma.conf.js:

// karma configuration module.exports = function(config) {     config.set({      // base path used resolve patterns (eg. files, exclude)     basepath: '',     frameworks: ['jasmine-jquery', 'jasmine'],     files: [         'bower_components/angular/angular.js',         'bower_components/angular-mocks/angular-mocks.js',         'node_modules/jquery/dist/jquery.js',         'src/**/*',         '.tsout/*.js'     ],     exclude: [         '**/*.ts',         '**/*.json'     ],     preprocessors: {        '.tsout/*.js': 'coverage'     },     reporters: ['progress', 'coverage'],     port: 9876,     colors: true,     loglevel: config.log_info,     autowatch: false,     browsers: ['chrome'],     plugins: [         'karma-jasmine-jquery',         'karma-jasmine',         'karma-coverage'     ],     singlerun: false   }); }; 

and, in 1 of .spec.js files have like:

describe("dom stuffs", function(){      it("should have dom element id test", function(){         expect($('#test').tobeindom());     });  }); 

karma fires off no complaints, , of previous tests run expected. when gets test, however, following typeerror:

typeerror: $(...).tobeindom not function @ object.<anonymous> 

any thoughts on i'm missing here?

versions: karma: 0.12.33 | jasmine: 2.1.1 | karma-jasmine: 0.3.5 | jasmine-jquery: 2.1.0 | karma-jasmine-jquery: 0.1.1


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -