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

41 lines
1012 B
TypeScript
Raw Normal View History

2018-10-18 09:19:10 +02:00
import {assert} from "chai"
2018-10-16 14:56:18 +02:00
import ConfigProvider from "../../src/ConfigProvider"
2018-10-05 12:34:18 +02:00
import Keeper from "../../src/keeper/Keeper"
2018-10-16 14:56:18 +02:00
import config from "../config"
import TestContractHandler from "./TestContractHandler"
2018-10-05 12:34:18 +02:00
let keeper: Keeper
describe("Keeper", () => {
before(async () => {
2018-10-26 10:40:46 +02:00
ConfigProvider.setConfig(config)
await TestContractHandler.prepareContracts()
keeper = await Keeper.getInstance()
})
2018-10-05 12:34:18 +02:00
describe("public interface", () => {
it("should have market", () => {
assert(keeper.market !== null)
})
it("should have auth", () => {
assert(keeper.auth !== null)
})
it("should have token", () => {
assert(keeper.token !== null)
})
2018-10-16 14:56:18 +02:00
})
describe("#getNetworkName()", () => {
2018-10-05 12:34:18 +02:00
2018-10-16 14:56:18 +02:00
it("should get development as default", async () => {
const networkName: string = await keeper.getNetworkName()
2018-11-14 09:36:37 +01:00
assert(networkName === "Development")
2018-10-05 12:34:18 +02:00
})
2018-10-16 14:56:18 +02:00
2018-10-05 12:34:18 +02:00
})
})