Added test for generateVanityAddress() with string contructor
This commit is contained in:
parent
8a5ff2467e
commit
93445039f9
|
@ -119,12 +119,18 @@ describe('.generate()', function () {
|
|||
})
|
||||
|
||||
describe('.generateVanityAddress()', function () {
|
||||
it('should generate an account with 000 prefix', function () {
|
||||
it('should generate an account with 000 prefix (object)', function () {
|
||||
var wallet = Wallet.generateVanityAddress(/^000/)
|
||||
assert.equal(wallet.getPrivateKey().length, 32)
|
||||
assert.equal(wallet.getAddress()[0], 0)
|
||||
assert.equal(wallet.getAddress()[1] >>> 4, 0)
|
||||
})
|
||||
it('should generate an account with 000 prefix (string)', function () {
|
||||
var wallet = Wallet.generateVanityAddress('^000')
|
||||
assert.equal(wallet.getPrivateKey().length, 32)
|
||||
assert.equal(wallet.getAddress()[0], 0)
|
||||
assert.equal(wallet.getAddress()[1] >>> 4, 0)
|
||||
})
|
||||
})
|
||||
|
||||
describe('.getV3Filename()', function () {
|
||||
|
|
Loading…
Reference in New Issue