scripts: adds tests for *HashOutput

This commit is contained in:
Daniel Cousens 2015-08-18 09:18:23 +10:00
parent ab1215adc1
commit 706f5d7a9c
4 changed files with 35 additions and 3 deletions

View file

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