1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Correct getState test to be async

This commit is contained in:
Dan Finlay 2016-12-23 17:31:24 -08:00
parent c05e04c611
commit 5e8a344f97

View File

@ -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()
})
})
})
})