Following Vojtajina's github example of Directive testing (
https://github.com/vojtajina/ng-directive-testing/), I have finally been able to unit test my directives that have templateUrl set by preloading the external templates in to the $templateCache.
The one problem I now face is that I have to always have Grunt launched and running with (windows) grunt.cmd watch:templates so that my templates get compiled/updated and my tests can execute.
I noticed that Vojtajina had set the following in his Testacular config file:
preprocessors = {
'**/*.html': 'html2js'
};
This doesn't appear to have any interaction with Grunt though as I set the same in my Testacular config and it doesn't execute the Grunt task. The documentation is pretty sparse on the preprocessor section of Testacular as well...
What am I doing wrong?