From 52d74a74b53fc78bdcf4e04dbecce6c686cb974f Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Thu, 23 Jun 2022 16:26:52 +1000 Subject: [PATCH] fix: remove test with no value --- src/lib/enr/keypair/index.spec.ts | 37 ------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/lib/enr/keypair/index.spec.ts diff --git a/src/lib/enr/keypair/index.spec.ts b/src/lib/enr/keypair/index.spec.ts deleted file mode 100644 index 9f9a54ba6d..0000000000 --- a/src/lib/enr/keypair/index.spec.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { supportedKeys } from "@libp2p/crypto/keys"; -import { peerIdFromKeys } from "@libp2p/peer-id"; -import { expect } from "chai"; - -import { - createPeerIdFromKeypair, - generateKeypair, - KeypairType, - Secp256k1Keypair, -} from "./index"; - -describe("createPeerIdFromKeypair", function () { - it("should properly create a PeerId from a secp256k1 keypair with private key", async function () { - const keypair = await generateKeypair(KeypairType.secp256k1); - - const expectedPeerId = await peerIdFromKeys( - keypair.publicKey, - keypair.privateKey - ); - const actualPeerId = await createPeerIdFromKeypair(keypair); - - expect(actualPeerId).to.be.deep.equal(expectedPeerId); - }); - - it("should properly create a PeerId from a secp256k1 keypair without private key", async function () { - const keypair = await generateKeypair(KeypairType.secp256k1); - delete (keypair as Secp256k1Keypair)._privateKey; - const pubKey = new supportedKeys.secp256k1.Secp256k1PublicKey( - keypair.publicKey - ); - - const expectedPeerId = await peerIdFromKeys(pubKey.bytes); - const actualPeerId = await createPeerIdFromKeypair(keypair); - - expect(actualPeerId).to.be.deep.equal(expectedPeerId); - }); -});