Skip to content

Commit

Permalink
Purge assertRejects shim (MetaMask#7794)
Browse files Browse the repository at this point in the history
  • Loading branch information
whymarrh authored and yqrashawn committed Jan 15, 2020
1 parent bda1f82 commit 48a0ae5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
9 changes: 4 additions & 5 deletions test/unit/app/account-import-strategies.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import assert from 'assert'
import ethUtil from 'ethereumjs-util'
import accountImporter from '../../../app/scripts/account-import-strategies/index'
import { assertRejects } from '../test-utils'

describe('Account Import Strategies', function () {
const privkey =
Expand All @@ -18,7 +17,7 @@ describe('Account Import Strategies', function () {
})

it('throws an error for empty string private key', async () => {
assertRejects(
assert.rejects(
async function () {
await accountImporter.importAccount('Private Key', [''])
},
Expand All @@ -28,19 +27,19 @@ describe('Account Import Strategies', function () {
})

it('throws an error for undefined string private key', async () => {
assertRejects(async function () {
assert.rejects(async function () {
await accountImporter.importAccount('Private Key', [undefined])
})
})

it('throws an error for undefined string private key', async () => {
assertRejects(async function () {
assert.rejects(async function () {
await accountImporter.importAccount('Private Key', [])
})
})

it('throws an error for invalid private key', async () => {
assertRejects(async function () {
assert.rejects(async function () {
await accountImporter.importAccount('Private Key', ['popcorn'])
})
})
Expand Down
15 changes: 0 additions & 15 deletions test/unit/test-utils.js

This file was deleted.

0 comments on commit 48a0ae5

Please sign in to comment.