How to test done part of ajax in jasmine
问题 I really like this resource for AJAX in general and it works in terms of testing a success or error function that's within the AJAX parameters. However, when I instead choose to not have a $.ajax({ ... success: ... }) and choose to have a .done() outside, I'm not sure how to test. Please help amend my simple spec, thanks! Code function itWorked() {} function sendRequest(callbacks, configuration) { $.ajax({}).done(function(response) { itWorked() }); } Spec fdescribe("Ajax Tests", function() {