ECKey: ensure throw is from ECKey

This commit is contained in:
Daniel Cousens 2014-05-31 11:28:00 +10:00
parent baec325e6f
commit 77ed66b24d

View file

@ -31,8 +31,10 @@ describe('ECKey', function() {
fixtures.invalid.constructor.forEach(function(f) {
it('throws on ' + f.D, function() {
var D = new BigInteger(f.D)
assert.throws(function() {
new ECKey(new BigInteger(f.D))
new ECKey(D)
}, new RegExp(f.exception))
})
})