I am executing jasmine unit test case for home.controller.js.
In home.route.js I have following code
app.config(['$stateProvider', 'homeConfig', 'stateHelperServiceProvider',
function config($stateProvider, appConfig, stateHelperService) {
'use strict';
$stateProvider.state(appConfig.states.base, {
url: appConfig.rootUrl,
data: stateHelperService.createStateData(appConfig),
views: {
'main': {
controller: 'homeController',
templateUrl: 'apps/home/home.tpl.html',
resolve: {
controller: ['$ocLazyLoad', function ($ocLazyLoad) {
//Projects should be loaded first before loading dashboard.
return $ocLazyLoad.load(["apps/assets/projects.bundle.js", "apps/assets/home.bundle.js"]);
}]
}
}
}
});
}]);
From above code the resolve section breaking the homeController unit test cases. If i comment the resolve section then all test cases are working fine.
Could you please provide your pointers for the same.
I recently added ocLazyLoad module in my app.
I am executing jasmine unit test case for home.controller.js.
In home.route.js I have following code
app.config(['$stateProvider', 'homeConfig', 'stateHelperServiceProvider', function config($stateProvider, appConfig, stateHelperService) { 'use strict';
From above code the resolve section breaking the homeController unit test cases. If i comment the resolve section then all test cases are working fine.
Could you please provide your pointers for the same.