Return promises from accountImporter tests (#7826)

feature/default_network_editable
Whymarrh Whitby 5 years ago committed by GitHub
parent 2525e5edaa
commit d0536ba984
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      test/unit/app/account-import-strategies.spec.js

@ -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' ])
}) })
}) })

Loading…
Cancel
Save