mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-06-24 19:41:57 +00:00
Create interface according to spec
This commit is contained in:
@ -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');
|
||||
})
|
||||
});
|
||||
|
Reference in New Issue
Block a user