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

18 lines
531 B
TypeScript
Raw Normal View History

2019-04-30 19:19:28 +02:00
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')
})
})