I have a directive in which controller is defined as a part of directive definition.
(function(){
var app = angular.module('app', []);
app.directive('test', function(){
return {
restrict: 'E',
templateUrl: 'test.html',
controller: ['$scope', function ($scope){...*set of functions*......}],
controllerAs:'reportCtrl',
link:function(Attrs){
}
};
});
})();
I need to write unit test for the set of functions. I am new to karma testing and I did not find much resources for this kind of code. I almost tried all the possible ways. Can someone help me to write unit test for this