jefflau / jest-fetch-mock

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

Add async to mockIf callback in README #196

Closed daniellenguyen closed 4 months ago

daniellenguyen commented 3 years ago

The callback function passed into mockIf() should be an async function. I followed this example down to the letter but it wouldn't work until I put an async in front of the callback - evidently there is a function somewhere in the stack that requires it.