From 352a6cfa171d16d17d679c910864ff286ffbf329 Mon Sep 17 00:00:00 2001 From: Stephen Whitmore Date: Tue, 15 Mar 2016 12:15:44 -0700 Subject: [PATCH] tests # of bits --- tests/test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test.js b/tests/test.js index 73f4147..0e46a42 100644 --- a/tests/test.js +++ b/tests/test.js @@ -62,5 +62,12 @@ describe('id', function (done) { expect(id2.id).to.deep.equal(id1.id) done() }) + + it('Non-default # of bits', (done) => { + const shortId = PeerId.create({ bits: 128 }) + const longId = PeerId.create({ bits: 256 }) + expect(shortId.privKey.length).is.below(longId.privKey.length) + done() + }) })