Correct getState test to be async

feature/default_network_editable
Dan Finlay 8 years ago
parent c05e04c611
commit 5e8a344f97
  1. 11
      test/unit/idStore-migration-test.js

@ -79,11 +79,14 @@ describe('IdentityStore to KeyringController migration', function() {
})
describe('entering a password', function() {
it('should identify an old wallet as an initialized keyring', function() {
it('should identify an old wallet as an initialized keyring', function(done) {
keyringController.configManager.setWallet('something')
const state = keyringController.getState()
assert(state.isInitialized, 'old vault counted as initialized.')
assert(!state.lostAccounts, 'no lost accounts')
keyringController.getState()
.then((state) => {
assert(state.isInitialized, 'old vault counted as initialized.')
assert(!state.lostAccounts, 'no lost accounts')
done()
})
})
})
})

Loading…
Cancel
Save