Quantcast
Channel: Chutzpah - A JavaScript Test Runner
Viewing all articles
Browse latest Browse all 1864

New Post: How to unit test Angular directive which have reference to external HTML

$
0
0
The appropriate example files for the question (related to jasmine) would be:
https://chutzpah.codeplex.com/SourceControl/latest#Facts.Integration/JS/Test/HtmlTemplate/template-jasmine.js
https://chutzpah.codeplex.com/SourceControl/latest#Facts.Integration/JS/Test/HtmlTemplate/template.tmpl.html

However, while this test runs fine, the template HTML isn't useful for the likely original purpose: to have an angularjs directive configure templateUrl = (path to html file). Injecting a <script> tag AS part of the template itself is not what we want angularjs to do, so a testing solution that does not place a <script> tag inside the template HTML would be required...

Viewing all articles
Browse latest Browse all 1864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>