wow-xhr
wow-xhr copied to clipboard
Mocked Fetch API returns an empty response
Hello, I'm getting an undefined response when call mocked endpoint with fetch API
fetch(endpoint).then(response => {
console.log({ response }); // 👈 response undefined
return response.json();
}
I'm not sure if the data is being set when resolving the promise in XhrMock#afterXHR What do you think?