Skip to content

Commit 509478c

Browse files
authored
Merge pull request #196 from daniellenguyen/patch-2
Add async to mockIf callback in README
2 parents 800c40d + 61dc4fe commit 509478c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ To enable mocking for a specific URL only:
8484
```js
8585
beforeEach(() => {
8686
// if you have an existing `beforeEach` just add the following lines to it
87-
fetchMock.mockIf(/^https?:\/\/example.com.*$/, req => {
87+
fetchMock.mockIf(/^https?:\/\/example.com.*$/, async (req) => {
8888
if (req.url.endsWith('/path1')) {
8989
return 'some response body'
9090
} else if (req.url.endsWith('/path2')) {

0 commit comments

Comments
 (0)