Add debug

This commit is contained in:
morrigan
2019-11-27 08:39:06 +01:00
parent fa33cdcd44
commit b5941c750c
5 changed files with 21 additions and 21 deletions

View File

@ -56,21 +56,15 @@ describe("Noise", () => {
wrappedOutbound.writeLP(Buffer.from("test"));
const response = await wrappedInbound.readLP();
expect(response.toString()).equal("test");
})
});
/*
it("should test that secureOutbound is spec compliant", async(done) => {
it("should test that secureOutbound is spec compliant", async() => {
const libp2pKeys = await generateEd25519Keys();
const libp2pKeys2 = await generateEd25519Keys();
const noiseInit = new Noise(libp2pKeys._key, localPeer.privKey.bytes);
const noiseResp = new Noise(libp2pKeys2._key, remotePeer.privKey.bytes);
const [inboundConnection, outboundConnection] = DuplexPair();
const [outbound, inbound] = await Promise.all([
noiseInit.secureOutbound(localPeer, outboundConnection, remotePeer),
noiseResp.secureInbound(remotePeer, inboundConnection, localPeer),
const [outbound] = await Promise.all([
noiseInit.secureOutbound(localPeer, outboundConnection, remotePeer),
(async () => {
const wrapped = Wrap(inboundConnection);
const prologue = Buffer.from('/noise');
@ -90,5 +84,4 @@ describe("Noise", () => {
})(),
]);
})
*/
});