1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +01:00
market/tests/unit/utils/getFromFaucet.test.ts

16 lines
411 B
TypeScript
Raw Normal View History

2020-05-07 08:03:30 +02:00
import axios, { AxiosResponse } from 'axios'
import getFromFaucet from '../../../src/utils/getFromFaucet'
jest.mock('axios')
describe('getFromFaucet()', () => {
2020-06-30 14:19:27 +02:00
;(axios as any).mockResolvedValue({
2020-05-07 08:03:30 +02:00
data: { success: true, message: 'hello' }
} as AxiosResponse)
it('can be called', async () => {
const response = await getFromFaucet('0x0000000')
expect(response.message).toBe('hello')
})
})