I was reading about Jasmine over here , which states:
When you want to mock out all ajax calls across an entire suite, use install() in a beforeEach. Because jasmine-ajax stubs out the global XMLHttpRequest for the page, you’ll want to uninstall() in an afterEach so specs or setup that expect to make a real ajax request can.
I'm relatively new to js side, I wonder whats exactly XMLHttpRequest
is?
If I'm doing something like this in jquery:
$.ajax({
url: "test.html",
context: document.body
}).done(function() {
$( this ).addClass( "done" );
});
then how come $.ajax
is related with XMLHttpRequest
. And they meant by global XMLHttpRequest
?