karma-ng-html2js-preprocessor icon indicating copy to clipboard operation
karma-ng-html2js-preprocessor copied to clipboard

html2js-preprocessor fails if templateUrl: (elem, attr) => {return template};

Open anxxel opened this issue 10 years ago • 0 comments

Hi,

I'm trying to test a directive with this kind of behaviour and if I use a dynamic template I have this error:

Error: Unexpected request: GET /partials/widgets/farefinder-compact/ directives/search-criteria/templates/default.html No more request expected at $httpBackend (http://localhost:9876/absolute/Users/aguilaa/source/app.ryanair.com/client/vendor/angular-mocks/angular-mocks.js:1244:9) at $httpBackend (http://localhost:9876/absolute/Users/aguilaa/source/app.ryanair.com/client/vendor/angular-mocks/angular-mocks.js:1237:11) at p (http://localhost:9876/absolute/Users/aguilaa/source/app.ryanair.com/client/vendor/angular/angular.min.js:89:97) at g (http://localhost:9876/absolute/Users/aguilaa/source/app.ryanair.com/client/vendor/angular/angular.min.js:86:245) at http://localhost:9876/absolute/Users/aguilaa/source/app.ryanair.com/client/vendor/angular/angular.min.js:119:113 at n.$eval (http://localhost:9876/absolute/Users/aguilaa/source/app.ryanair.com/client/vendor/angular/angular.min.js:133:221) at n.$digest (http://localhost:9876/absolute/Users/aguilaa/source/app.ryanair.com/client/vendor/angular/angular.min.js:130:233) at Object.window.TestElement.create (http://localhost:9876/absolute/Users/aguilaa/source/app.ryanair.com/client/lib/test-suite.js:31:18) at Object. (http://localhost:9876/base/widgets/farefinder-compact/directives/search-criteria/search-criteria.test.js:61:13) at Object.e as invoke Error: Declaration Location at window.inject.angular.mock.inject (http://localhost:9876/absolute/Users/aguilaa/source/app.ryanair.com/client/vendor/angular-mocks/angular-mocks.js:2409:25) at Suite. (http://localhost:9876/base/widgets/farefinder-compact/directives/search-criteria/search-criteria.test.js:57:14) at http://localhost:9876/base/widgets/farefinder-compact/directives/search-criteria/search-criteria.test.js:3:1

Is there any way to configure the plugin to accept this kind of configuration in the templateUrl property?

anxxel avatar Nov 25 '15 08:11 anxxel