angularjs - Unexpected request GET feature/app/public.html No more request expected $digest already in progress -


am writing unit test case testing <tabs><pane title="my first tab"></pane></tabs> reference :directive tab pane unit tests

 beforeeach(inject(function ($rootscope, $compile, $injector) {         httpbackend = $injector.get('$httpbackend');         elm = angular.element(             '<div>' +             '<tabs>' +             '<pane title="first tab">' +             'first content ' +             '</pane>' +             '<pane title="second tab">' +             'second content ' +             '</pane>' +             '</tabs>' +             '</div>');          scope = $rootscope;         $compile(elm)(scope);         scope.$digest();                    httpbackend.whenget('feature/app/public.htm').respond(elm);       }));      it('should create clickable titles', function () {         console.log(elm.find('ul.nav-tabs'));         var titles = elm.find('ul.nav-tabs li a');          expect(titles.length).tobe(2);         expect(titles.eq(0).text()).tobe('first tab');         expect(titles.eq(1).text()).tobe('second tab');     }); 

because scope.$digest(); giving above error added httpbackend load template.but error still seems exist. please suggest possible fixes above error


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -