|
|
@ -13,25 +13,25 @@ describe('Account Import Strategies', function () { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('throws an error for empty string private key', async () => { |
|
|
|
it('throws an error for empty string private key', async () => { |
|
|
|
assert.rejects(async function () { |
|
|
|
return assert.rejects(async function () { |
|
|
|
await accountImporter.importAccount('Private Key', [ '' ]) |
|
|
|
await accountImporter.importAccount('Private Key', [ '' ]) |
|
|
|
}, Error, 'no empty strings') |
|
|
|
}, Error, 'no empty strings') |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('throws an error for undefined string private key', async () => { |
|
|
|
it('throws an error for undefined string private key', async () => { |
|
|
|
assert.rejects(async function () { |
|
|
|
return assert.rejects(async function () { |
|
|
|
await accountImporter.importAccount('Private Key', [ undefined ]) |
|
|
|
await accountImporter.importAccount('Private Key', [ undefined ]) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('throws an error for undefined string private key', async () => { |
|
|
|
it('throws an error for undefined string private key', async () => { |
|
|
|
assert.rejects(async function () { |
|
|
|
return assert.rejects(async function () { |
|
|
|
await accountImporter.importAccount('Private Key', []) |
|
|
|
await accountImporter.importAccount('Private Key', []) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('throws an error for invalid private key', async () => { |
|
|
|
it('throws an error for invalid private key', async () => { |
|
|
|
assert.rejects(async function () { |
|
|
|
return assert.rejects(async function () { |
|
|
|
await accountImporter.importAccount('Private Key', [ 'popcorn' ]) |
|
|
|
await accountImporter.importAccount('Private Key', [ 'popcorn' ]) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|