How to test directives that use templateUrl and controllers?
EDIT: after asking the question, i'm now editing this to elaborate on my findings. My app is modularized using directives. I'm writing my directives such that they (1) create their own scope (2) use templateUrl, and (3) do most of the logic and server data fetching in their controller. The question is how to unit test it, using Mocha with Karma. Lior a test is written for each directive. Since the directive uses templateUrl, I used html2js. the html key should be included as a module - that puts the template into the templateCache. Then, I compiled the directive, and run the link function with