Skip to content

Commit

Permalink
tests: add type throwing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Oct 19, 2017
1 parent 6b9a597 commit 8051444
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/hdkey.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ describe('hdkey', function () {
assert.equal(hdkey.verify(Buffer.alloc(32), Buffer.alloc(64)), false)
assert.equal(hdkey.verify(ma, b), false)
assert.equal(hdkey.verify(mb, a), false)

assert.throws(function () {
hdkey.verify(Buffer.alloc(99), a)
}, /message length is invalid/)
assert.throws(function () {
hdkey.verify(ma, Buffer.alloc(99))
}, /signature length is invalid/)
})
})

Expand Down

0 comments on commit 8051444

Please sign in to comment.