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
When intercepting http call with MockAgent, we are not able to assert provided request configuration (body, querystring, headers etc...)
fetch-mock can permit it this way :
beforeEach(() => { mockClient.resetHistory(); }) it('should ...', async () => { mockClient.intercept({ path: '...', method: 'POST' }) .reply(201, 'hello) .time(1) await fetch('...', { body: JSON.stringify({ value: 'hello' }); }) expect(mockClient.history.getCall(1).body).toMatchSnapshot() })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This would solve...
When intercepting http call with MockAgent, we are not able to assert provided request configuration (body, querystring, headers etc...)
The implementation should look like...
fetch-mock can permit it this way :
The text was updated successfully, but these errors were encountered: