({ response })
| 26 | } |
| 27 | } |
| 28 | const parse: Fetch['parse'] = async ({ response }) => { |
| 29 | const data = (await response.json()) as |
| 30 | | { status: '1'; message: 'OK'; result: string } |
| 31 | | { status: '0'; message: 'NOTOK'; result: string } |
| 32 | if (data.status === '0') throw new Error(data.result) |
| 33 | return JSON.parse(data.result) |
| 34 | } |
| 35 | |
| 36 | test('fetches ABI', async () => { |
| 37 | await expect( |
nothing calls this directly
no outgoing calls
no test coverage detected