Open piotrzdziarski opened 5 years ago
Normally in browser when headers are received status is received too, but in this package status is 0:
xhrMock.setup(); xhrMock.get('/endpoint', { status: 200 }); const xhr = new XMLHttpRequest(); xhr.open('GET', '/endpoint', true); xhr.send(); xhr.onreadystatechange = () => { if (xhr.readyState === 2) { console.log(xhr.status); // outputs: 0 } };
I think it should already return passed status.
I'm having the same issue!
Normally in browser when headers are received status is received too, but in this package status is 0:
I think it should already return passed status.