Testing for a function that contains asynchronous code
问题 With qUnit, I understand how to use asyncTest() if you have asynchronous code within your tests, but what if you have a function that contains asynchronous code? In other words, the asynchronous request is not within the test, but is simply part of the code that is being tested. Take this code for example: function makeAjaxCall(){ $.get('/mypage', {}, function(data){ // Do something with `data` },'json'); } How can I call makeAjaxCall() within a test and then run tests on the data that is