(responses: Response[])
| 22 | }; |
| 23 | |
| 24 | const awaitJson = (responses: Response[]) => { |
| 25 | return Promise.all( |
| 26 | responses.map((response) => { |
| 27 | if (response.ok) return response.json(); |
| 28 | throw new Error(response.statusText); |
| 29 | }) |
| 30 | ); |
| 31 | }; |
| 32 | |
| 33 | fetch10Pokemon() |
| 34 | .then(awaitJson) |
nothing calls this directly
no outgoing calls
no test coverage detected