diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-06-25 07:13:27 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-06-25 07:13:27 +0800 |
commit | 122018a96a1b2b6d9b7eefe150ff76a9de69bdd7 (patch) | |
tree | cc72b18de256dad9db7055b4c4631cfa9d192347 /test/unit | |
parent | fa7e4665594525256b846de93bdd46115a3a53a7 (diff) | |
download | tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.tar tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.tar.gz tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.tar.bz2 tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.tar.lz tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.tar.xz tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.tar.zst tangerine-wallet-browser-122018a96a1b2b6d9b7eefe150ff76a9de69bdd7.zip |
Fixed tests
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/config-manager-test.js | 7 | ||||
-rw-r--r-- | test/unit/idStore-test.js | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/test/unit/config-manager-test.js b/test/unit/config-manager-test.js index 130bde2ff..7891c5c9e 100644 --- a/test/unit/config-manager-test.js +++ b/test/unit/config-manager-test.js @@ -1,12 +1,14 @@ var assert = require('assert') -var ConfigManager = require('../../app/scripts/lib/config-manager') +const extend = require('xtend') +const STORAGE_KEY = 'metamask-persistance-key' +var configManagerGen = require('../lib/mock-config-manager') var configManager describe('config-manager', function() { beforeEach(function() { window.localStorage = {} // Hacking localStorage support into JSDom - configManager = new ConfigManager() + configManager = configManagerGen() }) describe('confirmation', function() { @@ -209,3 +211,4 @@ describe('config-manager', function() { }) }) }) + diff --git a/test/unit/idStore-test.js b/test/unit/idStore-test.js index e9611d7e8..ee4613236 100644 --- a/test/unit/idStore-test.js +++ b/test/unit/idStore-test.js @@ -1,5 +1,6 @@ var assert = require('assert') var IdentityStore = require('../../app/scripts/lib/idStore') +var configManagerGen = require('../lib/mock-config-manager') describe('IdentityStore', function() { @@ -15,6 +16,7 @@ describe('IdentityStore', function() { window.localStorage = {} // Hacking localStorage support into JSDom idStore = new IdentityStore({ + configManager: configManagerGen(), ethStore: { addAccount(acct) { accounts.push(acct) }, }, @@ -34,6 +36,7 @@ describe('IdentityStore', function() { window.localStorage = {} // Hacking localStorage support into JSDom idStore = new IdentityStore({ + configManager: configManagerGen(), ethStore: { addAccount(acct) { newAccounts.push(acct) }, }, @@ -65,6 +68,7 @@ describe('IdentityStore', function() { window.localStorage = {} // Hacking localStorage support into JSDom idStore = new IdentityStore({ + configManager: configManagerGen(), ethStore: { addAccount(acct) { accounts.push(acct) }, }, |