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

44 lines
994 B
TypeScript
Raw Normal View History

2018-10-05 12:34:18 +02:00
import * as assert from "assert"
import ContractHandler from "../../src/keeper/ContractHandler"
import Web3Helper from "../../src/keeper/Web3Helper"
import Config from "../../src/models/Config"
import Ocean from "../../src/ocean/Ocean"
let ocean: Ocean
before(async () => {
2018-10-09 15:24:36 +02:00
const config: Config = {
nodeUri: "http://localhost:8545",
} as Config
2018-10-05 12:34:18 +02:00
const web3Helper = new Web3Helper(config)
await ContractHandler.deployContracts(web3Helper)
ocean = await Ocean.getInstance(config)
})
describe("Ocean", () => {
describe("public interface", () => {
it("should have tribe", async () => {
assert(ocean.tribe !== null)
})
it("should have account", async () => {
assert(ocean.account !== null)
})
it("should have order", async () => {
assert(ocean.order !== null)
})
it("should have asset", async () => {
assert(ocean.asset !== null)
})
})
})