diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-11-24 03:58:34 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-11-24 03:58:34 +0800 |
commit | 230a0ab876df82edc8147fd3c0ba18f10ffc4e3c (patch) | |
tree | 8058230a99ebe4a415cd19432ec54216ec252935 /test | |
parent | 600f5c31db47a06c0c9bb9a97c01476d77b0a0df (diff) | |
download | tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.tar tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.tar.gz tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.tar.bz2 tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.tar.lz tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.tar.xz tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.tar.zst tangerine-wallet-browser-230a0ab876df82edc8147fd3c0ba18f10ffc4e3c.zip |
Fix more keyring asyncifying tests
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/keyring-controller-test.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/unit/keyring-controller-test.js b/test/unit/keyring-controller-test.js index d35c8927f..056e465ca 100644 --- a/test/unit/keyring-controller-test.js +++ b/test/unit/keyring-controller-test.js @@ -77,10 +77,17 @@ describe('KeyringController', function() { keyringController.restoreKeyring(mockSerialized) .then((keyring) => { assert.equal(keyring.wallets.length, 1, 'one wallet restored') - assert.equal(keyring.getAccounts()[0], addresses[0]) + return keyring.getAccounts() + }) + .then((accounts) => { + assert.equal(accounts[0], addresses[0]) mock.verify() done() }) + .catch((reason) => { + assert.ifError(reason) + done() + }) }) }) |