How to test a directive's controller using angularJS-karma-jasmine?
问题 Goal: Write a passing test for the waCarousel directive scope variable: self.awesomeThings . Expect this test pass when self.awsomeThings.length.toBe(3) to is true? Question: How can I properly write this test? rather how do I inject a directives controller? Directive: angular.module('carouselApp') .directive('waCarousel', function() { return { templateUrl: '../../../views/carousel/wa.carousel.html', controller: function($scope) { var self = this; self.awesomeThings = [1, 2, 3]; return $scope