Create interface according to spec

This commit is contained in:
morrigan
2019-11-11 21:58:04 +01:00
parent 8cf420fd88
commit d2c844d598
8 changed files with 147 additions and 49 deletions

View File

@ -2,9 +2,10 @@ import { expect } from "chai";
import { Noise } from "../src";
describe("Index", () => {
it("should expose class with tag and encrypt functions", () => {
it("should expose class with tag and required functions", () => {
const noise = new Noise(Buffer.from("privatekey"));
expect(noise.tag()).to.equal('/noise');
expect(typeof(noise.encrypt)).to.equal('function');
expect(noise.protocol()).to.equal('/noise');
expect(typeof(noise.secureInbound)).to.equal('function');
expect(typeof(noise.secureOutbound)).to.equal('function');
})
});