scripts: adds tests for *HashOutput
This commit is contained in:
parent
ab1215adc1
commit
706f5d7a9c
4 changed files with 35 additions and 3 deletions
src
|
@ -4,7 +4,7 @@ var typeforce = require('typeforce')
|
|||
|
||||
function nBuffer (value, n) {
|
||||
if (!Buffer.isBuffer(value)) return false
|
||||
if (value.length !== n) throw new Error('Expected ' + (n * 8) + '-bit Buffer, got ' + (value.length * 8) + '-bit')
|
||||
if (value.length !== n) throw new Error('Expected ' + (n * 8) + '-bit Buffer, got ' + (value.length * 8) + '-bit Buffer')
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue