How to test a function inside a link of a directive in angular?
link:function(scope,element,attr) {
var closeBox = function(event) {
//do something...
}
$(document).on("click",closeBox);
}
How to test "closeBox"?