$scope.$on not working in Jasmine SpecRunner
问题 I've just started using Jasmine for testing an AngularJS app. I believe I'm doing all the imports on the SpecRunner but I get the error: TypeError: $scope.$on is not a function I'm using this in my controller as follows: app.controller('asstCtrl', function($scope, $uibModal, $interval, $document) { $scope.$on('$includeContentLoaded', function() { $scope.doStuff(); }); }); ... My SpecRunner test is looking like this: describe('calculator', function(){ beforeEach(module('asst')); it('basic',