Error on Jasmine - Expected event click to have been triggered on #DIV_ID
问题 I am referred this link to trigger a event when developing a testing tool in Jasmine framework: http://www.htmlgoodies.com/beyond/javascript/js-ref/testing-dom-events-using-jquery-and-jasmine-2.0.html I am trying to get the newly applied CSS attribute after triggering a click event on #DIV_ID in Jasmine framework. I am tried this code: spyEvent = spyOnEvent('#DIV_ID', 'click'); $('#DIV_ID').trigger( "click" ); expect('click').toHaveBeenTriggeredOn('#DIV_ID'); expect(spyEvent)