Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.

Commit 9e8c9ca

Browse files
tabrathdaviddias
authored andcommitted
Fix failing test (#39)
Buffer.from does not take a number (size), using Buffer.alloc instead.
1 parent bbdff86 commit 9e8c9ca

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/index.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ describe('multihash', () => {
185185
).to.throw()
186186
})
187187

188-
const longBuffer = Buffer.from(150)
189-
longBuffer.fill('a')
188+
const longBuffer = Buffer.alloc(150, 'a')
190189
expect(
191190
() => mh.validate(longBuffer)
192191
).to.throw()

0 commit comments

Comments
 (0)