This repository has been archived on 2023-04-09. You can view files and clone it, but cannot push or open issues or pull requests.
chainsafe-bls/test/unit/context.test.ts

20 lines
526 B
TypeScript
Raw Permalink Normal View History

import {init, getContext, destroy} from "../../src/context";
import {expect} from "chai";
describe("bls wasm constext", function () {
afterEach(() => {
destroy();
});
it("initializes and works", async function () {
await init();
expect(getContext().getCurveOrder())
.to.be.equal("52435875175126190479447740508185965837690552500527637822603658699938581184513");
});
it("throws if context not initialized", async function () {
expect(() => getContext().getCurveOrder()).to.throw();
});
});