Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit 8a5ff24

Browse files
committed
Added test for raw new Wallet() initialization
1 parent 3a42352 commit 8a5ff24

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,11 @@ describe('.fromQuorumWallet()', function () {
242242
assert.equal(wallet.getAddressString(), '0x1b86ccc22e8f137f204a41a23033541242a48815')
243243
})
244244
})
245+
246+
describe('raw new Wallet() init', function () {
247+
it('should fail when both priv and pub key provided', function () {
248+
assert.throws(function () {
249+
new Wallet(fixturePrivateKeyBuffer, fixturePublicKeyBuffer) // eslint-disable-line
250+
}, /^Error: Cannot supply both a private and a public key to the constructor$/)
251+
})
252+
})

0 commit comments

Comments
 (0)