We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 800c40d + 61dc4fe commit 509478cCopy full SHA for 509478c
README.md
@@ -84,7 +84,7 @@ To enable mocking for a specific URL only:
84
```js
85
beforeEach(() => {
86
// if you have an existing `beforeEach` just add the following lines to it
87
- fetchMock.mockIf(/^https?:\/\/example.com.*$/, req => {
+ fetchMock.mockIf(/^https?:\/\/example.com.*$/, async (req) => {
88
if (req.url.endsWith('/path1')) {
89
return 'some response body'
90
} else if (req.url.endsWith('/path2')) {
0 commit comments