Adding mock XHR for unit tests