I am working on an applicaiton and I am in need of writing karma test case for a file upload component.
The component uses $scope.$apply() and when my test case flow reaches that line it breaks with exception
TypeError: Cannot read property 'data' of undefined(…).
I have been trying but didnt find a way. Any thoughts?