How to test jquery and ajax calls using JsTestDriver?
问题 I have a dynamic page built with jQuery. Html pieces are loaded from mustache templates. These templates are downloaded from a url, and I would like to unit test the overall html construction : The JsTestDriver test is : AppTest = TestCase("AppTest") AppTest.prototype.test = function() { var actualHtml = ""; getHtml({ "title": "title", "header": "header", "text": "text", "authors": [ {"firstname": "firstname", "lastname": "lastname"} ] }, function(html) { actualHtml = html; }); assertEquals(