Open Bessonov opened 5 years ago
I am having the same issue
Have you managed to solve it?
This is working for me
fetchMock.mockResponse(() => Promise.resolve({
body: JSON.stringify({ ok: true }),
headers: [
['set-cookie', 'some cookie'],
['set-cookie', 'more cookies']
]
}));
Thank you for this great library!
I want to test a scenario, where a higher order utility function get in second request a :cookie: . To set headers seems not be handled by
jest-fetch-mock
:If I use react-cookie, then I can set the cookie, but for all requests, not second one.
Is there any way to workaround without touch the higher order utility function?