There is code:
angular.module('myApp', ['ngMock']);
While loading ngMock such error appears. Uncaught TypeError: $$rAF.throttle is not a function
Issue seems to be coming from angular material which decorates $$rAF service to add throttle function to it. Including angular.mocks is not enough hence. You need to mock angular material decorators too. You can probably use angular-material mock found here. It has mock for throttle. You would also need to list the module ngMaterial-mock as dependency while mocking. i.e
angular.module('myApp', ['ngMock', 'ngMaterial-mock']);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With