xhr: Wrote tests for xhr.js

- [ ] @davestein
Same deal here, should be called with the response