We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'd like to build something like this
export const assertFetch = (url, options, fn: MockResponseInitFunction) => { fetchMock.mockResponseOnce(async (req) => { expect(req.url).toBe(url); expect(req.options).toEqual(options); return normalizeResponse(fn); }); };
Where I assert the value of url and option of the request, but also mock the response
for this, I need to reuse normalizeResponse to keep the same api
normalizeResponse
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'd like to build something like this
Where I assert the value of url and option of the request, but also mock the response
for this, I need to reuse
normalizeResponse
to keep the same apiThe text was updated successfully, but these errors were encountered: