angularjs - Can't Inject Angular Controller in Mock Test -


i can't inject controller in mocha test file, keeps showing error:

error here

i followed the documentation here , tried other approaches, here code in test file:

var assert = chai.assert; var expect = chai.expect; var should = chai.should();  describe('suplements module', function(){     beforeeach(angular.mock.module('atari-app'));     beforeeach(inject(function ($rootscope, $controller) {         scope = $rootscope.$new();         controller = $controller('testcontroller', {             '$scope': scope         });     }));      describe('list supplements',function(){         it('should list supplements', function(){ });     }); }); 

here app , controller:

angular     .module('atari-app', [       'ui.router',       'ui.utils',       'oc.lazyload',       'ngresource',       'ngsanitize',       'ui.bootstrap',       'ui.select',       'authentication-app',       'angular-ladda',       'nganimate',       'toastr'     ]);    angular.module('atari-app')     .controller('testcontroller', ['$scope',       function ($scope) {         $scope.testudo = 1;       }     ]); 

my mocha version 2.5.3 , angular 1.4.6


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -