Trains browser to expect a JSON
request and respond to it.
$browser.xhr.expectJSON(url);
url – {string} –
Url path for which a request is expected.
{object}
– Response configuration object. You can call its respond()
method to
configure what should the browser mock return when the response is
flushed
.