mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-04-25 14:32:18 +00:00
Fix invalid test
This commit is contained in:
parent
06d5034998
commit
d127c8f6d4
@ -263,7 +263,7 @@ describe("Noise", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("IK -> XX Fallback: responder has no remote static key", async() => {
|
||||
it("IK: responder has no remote static key", async() => {
|
||||
try {
|
||||
const staticKeysInitiator = generateKeypair();
|
||||
const noiseInit = new Noise(staticKeysInitiator.privateKey);
|
||||
@ -272,7 +272,7 @@ describe("Noise", () => {
|
||||
const noiseResp = new Noise(staticKeysResponder.privateKey);
|
||||
const ikInitSpy = sandbox.spy(noiseInit, "performIKHandshake");
|
||||
const xxFallbackInitSpy = sandbox.spy(noiseInit, "performXXFallbackHandshake");
|
||||
const xxRespSpy = sandbox.spy(noiseResp, "performXXHandshake");
|
||||
const ikRespSpy = sandbox.spy(noiseResp, "performIKHandshake");
|
||||
|
||||
// Prepare key cache for noise pipes
|
||||
KeyCache.resetStorage();
|
||||
@ -293,8 +293,8 @@ describe("Noise", () => {
|
||||
expect(response.toString()).equal("test fallback");
|
||||
|
||||
assert(ikInitSpy.calledOnce, "IK handshake was not called.");
|
||||
assert(xxFallbackInitSpy.calledOnce, "XX Fallback method was not called.");
|
||||
assert(xxRespSpy.calledOnce, "XX method was not called.");
|
||||
assert(ikRespSpy.calledOnce, "IK handshake was not called.");
|
||||
assert(xxFallbackInitSpy.notCalled, "XX Fallback method was called.");
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
assert(false, e.message);
|
||||
|
Loading…
x
Reference in New Issue
Block a user