mock
mock copied to clipboard
Design and implement a mock for fetch
Fetch is a commonly used global function that users would want to be able to mock. Currently they would have to use stub and design their own replacement fetch function.
I'd like to design a fakeFetch function to make it easier for users to stub in a more standard way. I haven't fleshed out a design yet for this and am open to contributions. If you'd like to contribute a feature like this, first comment on this issue with information about your proposed design for a fakeFetch function. If I approve of it, I'd be happy to have it included with the mock module. If you do not want to implement the idea, I'd be happy to when I have free time to or if I reach a point where I need to stub fetch for another project I'm working on.