All files fetch.js

100% Statements 6/6
100% Branches 0/0
100% Functions 2/2
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18              9x   9x 9x 9x   9x 9x      
 
import xhrRequest from './set_request';
import createPromise from './create_promise';
 
export default function(url){
  let promise, xhr;
 
  promise = createPromise();
 
  xhr = xhrRequest(promise.resolve, promise.reject);
  xhr.open('GET', url);
  xhr.send();
 
  return function(){
    return promise.promise;
  };
};