Files
ipfs-bch-wallet-service/test/unit/mocks/adapters/index.js
T

81 lines
1.1 KiB
JavaScript
Raw Normal View History

2021-07-13 12:34:51 -07:00
/*
Mocks for the Adapter library.
*/
const ipfs = {
ipfsAdapter: {
ipfs: {}
},
ipfsCoordAdapter: {
ipfsCoord: {
useCases: {
peer: {
sendPrivateMessage: () => {}
}
}
}
2021-07-13 12:34:51 -07:00
}
}
const localdb = {
Users: class Users {
static findById () {}
static find () {}
static findOne () {
return {
validatePassword: localdb.validatePassword
}
}
async save () {
return {}
}
generateToken () {
return '123'
}
toJSON () {
return {}
}
async remove () {
return true
}
async validatePassword () {
return true
}
},
validatePassword: () => {
return true
}
}
2021-07-16 18:51:38 -07:00
const bchjs = {
Electrumx: {
transactions: () => {},
2022-01-28 08:03:35 -08:00
balance: () => {},
sortAllTxs: () => {}
2021-07-16 18:51:38 -07:00
},
Utxo: {
2022-05-10 10:14:37 -07:00
get: () => {},
isValid: () => true
2021-07-16 18:51:38 -07:00
},
Transaction: {
get: () => {}
},
RawTransactions: {
sendRawTransaction: () => {}
},
encryption: {
getPubKey: () => {}
2022-01-28 08:03:35 -08:00
},
Util: {
chunk100: () => {}
2021-07-16 18:51:38 -07:00
}
}
module.exports = { ipfs, localdb, bchjs }