I\'m trying to test a new directive I\'m writing. However, I can\'t seem to get the keydown event to trigger with jQuery inside Karma/Jasmine.
Here is a simplified
I hope this works
var e = $.Event('keydown'); e.which = 65; $(inputEl).trigger(e); // convert inputEl into a jQuery object first // OR angular.element(inputEl).triggerHandler(e); // angular.element uses triggerHandler instead of trigger to trigger events