1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Return promises from accountImporter tests (#7826)

This commit is contained in:
Whymarrh Whitby 2020-01-15 13:27:51 -03:30 committed by GitHub
parent 2525e5edaa
commit d0536ba984
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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