mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
test - unit - import strategies - properly await async methods
This commit is contained in:
parent
b24efcb1cd
commit
62586b3b6e
@ -14,26 +14,26 @@ describe('Account Import Strategies', function () {
|
||||
})
|
||||
|
||||
it('throws an error for empty string private key', async () => {
|
||||
assert.throws(function() {
|
||||
accountImporter.importAccount('Private Key', [ '' ])
|
||||
assert.throws(async function() {
|
||||
await accountImporter.importAccount('Private Key', [ '' ])
|
||||
}, Error, 'no empty strings')
|
||||
})
|
||||
|
||||
it('throws an error for undefined string private key', async () => {
|
||||
assert.throws(function () {
|
||||
accountImporter.importAccount('Private Key', [ undefined ])
|
||||
assert.throws(async function () {
|
||||
await accountImporter.importAccount('Private Key', [ undefined ])
|
||||
})
|
||||
})
|
||||
|
||||
it('throws an error for undefined string private key', async () => {
|
||||
assert.throws(function () {
|
||||
accountImporter.importAccount('Private Key', [])
|
||||
assert.throws(async function () {
|
||||
await accountImporter.importAccount('Private Key', [])
|
||||
})
|
||||
})
|
||||
|
||||
it('throws an error for invalid private key', async () => {
|
||||
assert.throws(function () {
|
||||
accountImporter.importAccount('Private Key', [ 'popcorn' ])
|
||||
assert.throws(async function () {
|
||||
await accountImporter.importAccount('Private Key', [ 'popcorn' ])
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user