Mocha Chai Testfall für eckige Konfigurationsdatei
s fällt mir schwer, den Mokka-Chai-Testfall für die eckige js-Konfigurationsdatei zu löse
angular.module('myApp.myModule', []).config(function ($stateProvider, $urlRouterProvider) {
$stateProvider.state('myModule', {
url: '/myModule',
templateUrl: function(){
return 'scripts/my-module/views/my-module.html';
},
controller: 'myModuleCtrl',
controllerAs: 'myCtrl',
css: 'styles/lazy-load/my-module.css'
});
$urlRouterProvider.otherwise('/');
})
Ich muss den Mokka-Chai-Testfall für die Rückgabefunktion von "templateUrl" abdecken, die eine URL zurückgibt ('scripts / my-module / views / my-module.html').