Added test for raw new Wallet() initialization

This commit is contained in:
holgerd77 2018-02-09 12:40:41 +01:00
parent 3a423526c5
commit 8a5ff2467e
1 changed files with 8 additions and 0 deletions

View File

@ -242,3 +242,11 @@ describe('.fromQuorumWallet()', function () {
assert.equal(wallet.getAddressString(), '0x1b86ccc22e8f137f204a41a23033541242a48815')
})
})
describe('raw new Wallet() init', function () {
it('should fail when both priv and pub key provided', function () {
assert.throws(function () {
new Wallet(fixturePrivateKeyBuffer, fixturePublicKeyBuffer) // eslint-disable-line
}, /^Error: Cannot supply both a private and a public key to the constructor$/)
})
})