Jasmine spies not being called
问题 I am having some trouble implimenting spying in Jasmine I want to check if a link has been clicked on a slider using a jasmine spy and jasmine jquery. Here is a simplified version: I have some links as part of an html fixture file. <a href="#" class="someLink">Link 1</a> <a href="#" class="someLink">Link 2</a> slider: var Slider = function(links){ this.sliderLinks = $(links); this.bindEvents(); } Slider.prototype.bindEvents = function(){ this.sliderLinks.on('click', this.handleClick); }