jefflau / jest-fetch-mock

Jest mock for fetch
MIT License
883 stars 116 forks source link

mock fetches to obey abort signals #112

Closed akmjenkins closed 4 years ago

akmjenkins commented 5 years ago

Just a thought, I like jest-fetch-mock but my tests frequently include

expect(fetch.mock.calls[0][1].signal.aborted).toBeTruthy();

when I'd much rather do an

expect(...).rejects.toThrow()

danvoyce commented 5 years ago

Any progress on this being merged? I'd really like to be able to test my code that uses this great feature 😬

jefflau commented 5 years ago

Sorry been super busy recently and looking into merging a big PR on conditional mocking. Afterwards when I have time I can look into this

rkurbatov commented 4 years ago

Eagerly waiting for! :)

yinzara commented 4 years ago

This was closed as part of the referenced PR