mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-06-23 20:01:50 +00:00
fix: consistent buffer usage (#56)
* fix: consistent buffer usage Closes #49 * more fixes for node 4
This commit is contained in:
committed by
David Dias
parent
c45bdf602e
commit
1a2d468369
@ -97,14 +97,16 @@ describe('libp2p-crypto', () => {
|
||||
true
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
it('randomBytes throws with no number passed', () => {
|
||||
describe('randomBytes', () => {
|
||||
it('throws with no number passed', () => {
|
||||
expect(() => {
|
||||
crypto.randomBytes()
|
||||
}).to.throw
|
||||
})
|
||||
|
||||
it('randomBytes', () => {
|
||||
it('generates different random things', () => {
|
||||
const buf1 = crypto.randomBytes(10)
|
||||
expect(buf1.length).to.equal(10)
|
||||
const buf2 = crypto.randomBytes(10)
|
||||
|
Reference in New Issue
Block a user