I have the following AngularJS directive that creates an input element. Input has ng-change attribute that runs doIt() function. In my
input
ng-change
doIt()
simple and it works in your unit test env:
spyOn(self, 'updateTransactionPrice'); var el = compile('')(scope); el.find('input').triggerHandler('change'); expect(self.updateTransactionPrice).toHaveBeenCalled();