Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mocked Fetch API returns an empty response #5

Open
MaxwelSant opened this issue Aug 6, 2022 · 0 comments
Open

Mocked Fetch API returns an empty response #5

MaxwelSant opened this issue Aug 6, 2022 · 0 comments

Comments

@MaxwelSant
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant