I am trying to run a unit test on my controller, but it depends on some data that has occurred since the route resolved. I just can't figure out how to check this (or not miss a test because it cannot find "locals")
Controller:
myMainModule.controller('theController', function theController($scope, $route) { [...] $scope.variable = $route.current.locals.data; [...] }
Route Configuration:
[...].config(function ($routeProvider, $locationProvider) { $routeProvider.when([...], { templateUrl: [...], controller: 'theController', resolve: { data: [...] } } [...] } [...]
source share