We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 756ff58 commit 7e8f1c9Copy full SHA for 7e8f1c9
README.md
@@ -81,17 +81,13 @@ The promise should resolve with an object containing body and init props
81
i.e:
82
83
```
84
-fetch.mockResponse(new Promise((resolve, reject) => {
85
- return callMyApi().then(res => ({body: res}))
86
-}))
+fetch.mockResponse(() => callMyApi().then(res => ({body: res}))
87
88
89
The same goes for rejects:
90
91
92
-fetch.mockReject(new Promise((resolve, reject) => {
93
- return doMyAsyncJob().then(res => res.errorToRaise)
94
+fetch.mockReject(() => doMyAsyncJob().then(res => res.errorToRaise))
95
96
97
### Mock utilities
0 commit comments