diff options
author | Dan Finlay <dan@danfinlay.com> | 2018-06-12 05:58:05 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2018-06-12 05:58:05 +0800 |
commit | b24efcb1cd9092dfe131af47639ac75ed9209a4c (patch) | |
tree | c83aaae1b38a501e2b72fc397acf61222d47e6fa /test/unit/app | |
parent | 385927a1b991eb96cf1db1e42d5f6d989e4a5a16 (diff) | |
download | tangerine-wallet-browser-b24efcb1cd9092dfe131af47639ac75ed9209a4c.tar tangerine-wallet-browser-b24efcb1cd9092dfe131af47639ac75ed9209a4c.tar.gz tangerine-wallet-browser-b24efcb1cd9092dfe131af47639ac75ed9209a4c.tar.bz2 tangerine-wallet-browser-b24efcb1cd9092dfe131af47639ac75ed9209a4c.tar.lz tangerine-wallet-browser-b24efcb1cd9092dfe131af47639ac75ed9209a4c.tar.xz tangerine-wallet-browser-b24efcb1cd9092dfe131af47639ac75ed9209a4c.tar.zst tangerine-wallet-browser-b24efcb1cd9092dfe131af47639ac75ed9209a4c.zip |
Make account import tests much more specific
However, they no longer seem to work. I'm unclear why this test is
failing. The private key being provided should be valid.
Diffstat (limited to 'test/unit/app')
-rw-r--r-- | test/unit/app/account-import-strategies.spec.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/unit/app/account-import-strategies.spec.js b/test/unit/app/account-import-strategies.spec.js index 2f88d497f..f026531f6 100644 --- a/test/unit/app/account-import-strategies.spec.js +++ b/test/unit/app/account-import-strategies.spec.js @@ -7,33 +7,33 @@ describe('Account Import Strategies', function () { const privkey = '0x4cfd3e90fc78b0f86bf7524722150bb8da9c60cd532564d7ff43f5716514f553' const json = '{"version":3,"id":"dbb54385-0a99-437f-83c0-647de9f244c3","address":"a7f92ce3fba24196cf6f4bd2e1eb3db282ba998c","Crypto":{"ciphertext":"bde13d9ade5c82df80281ca363320ce254a8a3a06535bbf6ffdeaf0726b1312c","cipherparams":{"iv":"fbf93718a57f26051b292f072f2e5b41"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"7ffe00488319dec48e4c49a120ca49c6afbde9272854c64d9541c83fc6acdffe","n":8192,"r":8,"p":1},"mac":"2adfd9c4bc1cdac4c85bddfb31d9e21a684e0e050247a70c5698facf6b7d4681"}}' - describe.only('private key import', function () { + describe('private key import', function () { it('imports a private key and strips 0x prefix', async function () { const importPrivKey = await accountImporter.importAccount('Private Key', [ privkey ]) assert.equal(importPrivKey, ethUtil.stripHexPrefix(privkey)) }) it('throws an error for empty string private key', async () => { - assert.throws(async () => { - const privKey = await accountImporter.importAccount('Private Key', [ '' ]) - }) + assert.throws(function() { + accountImporter.importAccount('Private Key', [ '' ]) + }, Error, 'no empty strings') }) it('throws an error for undefined string private key', async () => { - assert.throws(async () => { - const privKey = await accountImporter.importAccount('Private Key', [ undefined ]) + assert.throws(function () { + accountImporter.importAccount('Private Key', [ undefined ]) }) }) it('throws an error for undefined string private key', async () => { - assert.throws(async () => { - const privKey = await accountImporter.importAccount('Private Key', []) + assert.throws(function () { + accountImporter.importAccount('Private Key', []) }) }) it('throws an error for invalid private key', async () => { - assert.throws(async () => { - const privKey = await accountImporter.importAccount('Private Key', [ 'popcorn' ]) + assert.throws(function () { + accountImporter.importAccount('Private Key', [ 'popcorn' ]) }) }) }) |