So I'm coming up with an issue when developing tests for some AngularJS factories.
I have one that uses lodash. Whenever I try to run the test spec runner, this is what I get:
This is how my code looks in the places that use lodash, or specifically, the ngLodash directive.
In file chart-service.js
angular
.module('app.core')
.factory('ChartService', ChartService);
ChartService.inject = ['DataService', 'QueryService', 'lodash', '$q', '$log', 'APPSETTINGS', 'CacheService', '$timeout'];
function ChartService(DataService, QueryService, lodash, $q, $log, APPSETTINGS, CacheService, $timeout) {
In a different file (app.module.js)
angular.module('app', [
// App Modules
'settings',
'app.core',
'app.navigation',
'app.widgets',
'app.workspace',
'app.dslegend',
'app.custompage',
// Common Modules
'common.utilities',
'common.exception',
'ngLodash'
]);
In the app.core module:
angular
.module('app.core', [
//'ngAnimate',
'common.exception',
'common.logger',
'ui.router',
'ngStorage',
'xeditable'
]);
Aucun commentaire:
Enregistrer un commentaire