Remove WalletLock and Storage tests
This commit is contained in:
parent
61b677498b
commit
24c927a93a
11 changed files with 108 additions and 1043 deletions
|
|
@ -60,4 +60,7 @@ FakeBlockchain.prototype.checkSentTx = function (tx, cb) {
|
|||
return cb(null, txid);
|
||||
};
|
||||
|
||||
FakeBlockchain.prototype.removeAllListeners = function() {
|
||||
};
|
||||
|
||||
module.exports = FakeBlockchain;
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
//localstorage Mock
|
||||
|
||||
function FakeLocalStorage() {
|
||||
this.ls = {};
|
||||
this.type = 'DB';
|
||||
};
|
||||
|
||||
FakeLocalStorage.prototype.init = function() {
|
||||
};
|
||||
|
||||
FakeLocalStorage.prototype.removeItem = function(key, cb) {
|
||||
delete this.ls[key];
|
||||
cb();
|
||||
};
|
||||
|
||||
FakeLocalStorage.prototype.getItem = function(k, cb) {
|
||||
return cb(this.ls[k]);
|
||||
};
|
||||
|
||||
|
||||
FakeLocalStorage.prototype.allKeys = function(cb) {
|
||||
return cb(Object.keys(this.ls));
|
||||
};
|
||||
|
||||
FakeLocalStorage.prototype.setItem = function(k, v, cb) {
|
||||
this.ls[k] = v;
|
||||
return cb();
|
||||
};
|
||||
FakeLocalStorage.prototype.clear = function(cb) {
|
||||
this.ls = {};
|
||||
if (cb) return cb();
|
||||
}
|
||||
|
||||
module.exports = FakeLocalStorage;
|
||||
|
||||
module.exports.storageParams = {
|
||||
password: '123',
|
||||
db: new FakeLocalStorage(),
|
||||
sessionStorage: new FakeLocalStorage(),
|
||||
passphraseConfig: {
|
||||
iterations: 1,
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue