I have a directive like this:
angular.module('default', []);
angular.module('default').
directive('default', function()
{
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('error', function() {
angular.element(this).attr("src", attrs.default);
});
}
}
});
I want to write unit tests for this directive. I am using karma-jasmine for writing unit tests. How do I go about doing this.