Error: Unexpected request: GET views/partials/* for a nested directive even when using html2js in karma/jasmine unit test
I am using Karma and Jasmine for unit testing for my angularjs application. I have a directive's(say Directive A) template in which another directive(say Directive B) is getting rendered, although it is working fine in application but test case fails to render the Directive B's template. Following is the error I get :- Error: Unexpected request: GET views/partials/directiveb.html Expected GET https://my-sandbox.app.com/123456 Below is the directive A's code :- angular.module('myApp') .directive('directiveA', function (myservices, myOtherServices) { return { controller: function(){ /* ...