tests # of bits

This commit is contained in:
Stephen Whitmore 2016-03-15 12:15:44 -07:00
parent 727355c4f5
commit 352a6cfa17

View File

@ -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()
})
})