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

Commit 1d72012

Browse files
committed
Adds missing keccak test.
1 parent 28d1354 commit 1d72012

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/hash.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ describe('keccak', function() {
4848
keccak((<unknown>msg) as Buffer)
4949
})
5050
})
51+
it('should error if provided incorrect bits', function() {
52+
const msg = '0x3c9229289a6125f7fdf1885a77bb12c37a8d3b4962d936f7e3084dece32a3ca1'
53+
assert.throws(function() {
54+
keccak(toBuffer(msg), 1024)
55+
})
56+
})
5157
})
5258

5359
describe('keccak256', function() {

0 commit comments

Comments
 (0)