mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
28 lines
671 B
TypeScript
28 lines
671 B
TypeScript
import {assert} from "chai"
|
|
import ConfigProvider from "../../src/ConfigProvider"
|
|
import ContractHandler from "../../src/keeper/ContractHandler"
|
|
import config from "../config"
|
|
|
|
describe("ContractHandler", () => {
|
|
|
|
before(async () => {
|
|
ConfigProvider.setConfig(config)
|
|
})
|
|
|
|
describe("#get()", () => {
|
|
|
|
it("should load and get OceanToken correctly", async () => {
|
|
assert(await ContractHandler.get("OceanToken"))
|
|
})
|
|
|
|
it("should fail to load an unknown contract", (done) => {
|
|
|
|
ContractHandler.get("OceanXXX")
|
|
.catch(() => {
|
|
|
|
done()
|
|
})
|
|
})
|
|
})
|
|
})
|