test: add XHR tests with Sinon