Remove WalletLock and Storage tests

This commit is contained in:
Esteban Ordano 2014-10-25 17:14:04 -03:00
commit 24c927a93a
11 changed files with 108 additions and 1043 deletions

View file

@ -60,4 +60,7 @@ FakeBlockchain.prototype.checkSentTx = function (tx, cb) {
return cb(null, txid);
};
FakeBlockchain.prototype.removeAllListeners = function() {
};
module.exports = FakeBlockchain;

View file

@ -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,
},
};