1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00
commons/client/src/ocean.test.ts
2019-05-04 04:27:27 +02:00

18 lines
531 B
TypeScript

import Web3 from 'web3'
import { provideOcean, requestFromFaucet } from './ocean'
describe('ocean', () => {
const web3 = new Web3(Web3.givenProvider)
it('provideOcean can be called', async () => {
const response = await provideOcean(web3)
expect(response.ocean).toBeTruthy()
})
it('requestFromFaucet can be called', async () => {
const response = await requestFromFaucet('0xxxxxx')
response &&
expect(response.errors[0].msg).toBe('Invalid Ethereum address')
})
})