Open
Description
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 :
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()
})