1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00
squid-js/test/keeper/Keeper.test.ts

33 lines
915 B
TypeScript
Raw Normal View History

2019-06-20 00:20:09 +02:00
import { assert } from 'chai'
import config from '../config'
import TestContractHandler from './TestContractHandler'
import Keeper from '../../src/keeper/Keeper'
import { Ocean } from '../../src/ocean/Ocean'
2018-10-05 12:34:18 +02:00
let keeper: Keeper
2019-06-20 00:20:09 +02:00
describe('Keeper', () => {
before(async () => {
await TestContractHandler.prepareContracts()
const ocean = await Ocean.getInstance(config)
keeper = ocean.keeper
})
2019-06-20 00:20:09 +02:00
describe('public interface', () => {
it('should have dispenser', () => {
2019-01-28 15:41:19 +01:00
assert(keeper.dispenser !== null)
2018-10-05 12:34:18 +02:00
})
2019-06-20 00:20:09 +02:00
it('should have token', () => {
2018-10-05 12:34:18 +02:00
assert(keeper.token !== null)
})
2018-10-16 14:56:18 +02:00
})
2019-06-20 00:20:09 +02:00
describe('#getNetworkName()', () => {
it('should get development as default', async () => {
2018-10-16 14:56:18 +02:00
const networkName: string = await keeper.getNetworkName()
2019-06-20 00:20:09 +02:00
assert(networkName === 'Development')
2018-10-05 12:34:18 +02:00
})
})
})