mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-15 01:34:57 +01:00
16 lines
411 B
TypeScript
16 lines
411 B
TypeScript
import axios, { AxiosResponse } from 'axios'
|
|
import getFromFaucet from '../../../src/utils/getFromFaucet'
|
|
|
|
jest.mock('axios')
|
|
|
|
describe('getFromFaucet()', () => {
|
|
;(axios as any).mockResolvedValue({
|
|
data: { success: true, message: 'hello' }
|
|
} as AxiosResponse)
|
|
|
|
it('can be called', async () => {
|
|
const response = await getFromFaucet('0x0000000')
|
|
expect(response.message).toBe('hello')
|
|
})
|
|
})
|