TypeError: Cannot read property 'data' of undefined(…) while unit testing code that has $scope.$apply()

43 views
Skip to first unread message

nare...@gmail.com

unread,
Sep 22, 2015, 12:14:57 AM9/22/15
to karma-users
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?


Reply all
Reply to author
Forward
0 new messages