I am testing my angularJS application. While testing routes, I am using angular.mock.module('module1') to mock a parent route and later used for testing child routes.
The official definition of angular.mock.module() says - This function registers a module configuration code. It collects the configuration information which will be used when the injector is created by inject.
The problem is that I have defined the module config in .constant instead of .config. I had to do this to register state dynamically at application bootstrap.
I want to mock the module using the configuration stored in the .constant object.
angular.module('name', []
.constant('cons', { name: 'name', url: 'url', views: {}})