aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-10-22 03:26:56 +0800
committerDan Finlay <dan@danfinlay.com>2016-10-22 03:26:56 +0800
commitee73e373a0736e1dd1304cedf662e9d575d178c7 (patch)
treeb5942dcc810548a8f8ca34196dffb028c8e1697c /test
parent44aa1be2778a1647c9a607fd02c61bf93704d92d (diff)
downloadtangerine-wallet-browser-ee73e373a0736e1dd1304cedf662e9d575d178c7.tar.gz
tangerine-wallet-browser-ee73e373a0736e1dd1304cedf662e9d575d178c7.tar.zst
tangerine-wallet-browser-ee73e373a0736e1dd1304cedf662e9d575d178c7.zip
Create new vault before each keyringController unit test
Diffstat (limited to 'test')
-rw-r--r--test/unit/keyring-controller-test.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/unit/keyring-controller-test.js b/test/unit/keyring-controller-test.js
index fbcd3ba81..738aa1a84 100644
--- a/test/unit/keyring-controller-test.js
+++ b/test/unit/keyring-controller-test.js
@@ -14,7 +14,7 @@ describe('KeyringController', function() {
let accounts = []
let originalKeystore
- beforeEach(function() {
+ beforeEach(function(done) {
window.localStorage = {} // Hacking localStorage support into JSDom
keyringController = new KeyringController({
@@ -27,6 +27,10 @@ describe('KeyringController', function() {
// Stub out the browser crypto for a mock encryptor.
// Browser crypto is tested in the integration test suite.
keyringController.encryptor = mockEncryptor
+
+ keyringController.createNewVault(password, null, function (err, state) {
+ done()
+ })
})
describe('#createNewVault', function () {
@@ -36,12 +40,10 @@ describe('KeyringController', function() {
assert.ifError(err)
const vault = keyringController.configManager.getVault()
assert(vault, 'vault created')
-
done()
})
})
})
-
})