I am trying to unittest our angular directives which are implemented with external templates. As far as I can find there are only two options:
- use $httpBackend to respond with the template when requested in the directive
- use the preprocessor created for Karma to fill the $templateCache
Number 1 is really not convenient and probably quite errorprone since we have to keep the actual template and the respond version in sync. Number two is not an option since we are not in a position to install karma on our CI environment (TFS Online).
Have I missed something? Are there any other options?
Thanks, Casper