Jasmine testing .load() to get called URL
问题 I have a function which loads a template and I want to check the correct URL is being called. As I can't find any information other than for spying on ajax calls, I'm presuming it's the same for .load() calls. I'm using Jasmine 2.4.1 Function function templateLoader() { var templateURL = '/path/to/template.html'; $('#myElement').load(templateURL, function(response, status, xhr) { if (status === "error") { common.templateError(templateURL, xhr); } else { ns.successFunction(); } }); } Jasmine