xhr: Wrote tests for xhr.js

- [ ] @davestein
These two lines are going to make the callbacks attached to jQuery's `$.ajax` instead of using the returned promise.