Added first unit tests for blockbook

This commit is contained in:
Chris Troutner
2019-06-09 14:31:36 -07:00
parent a2447bd07c
commit fca3e25b73
4 changed files with 63 additions and 10 deletions
+43
View File
@@ -0,0 +1,43 @@
/*
This library contains mocking data for running unit tests on the blockbook route.
*/
"use strict"
const mockBalance = {
page: 1,
totalPages: 1,
itemsOnPage: 1000,
address: "bchtest:qq89kjkeqz9mngp8kl3dpmu43y2wztdjqu500gn4c4",
balance: "10000000",
totalReceived: "10000000",
totalSent: "0",
unconfirmedBalance: "0",
unconfirmedTxs: 0,
txs: 1,
txids: ["5fe9b74056319a8c87f45cc745030715a6180758b94938dbf90d639d55652392"]
}
const mockUtxos = [
{
_id: "5cf2c31a33bd46a95ec7e730",
chain: "BCH",
network: "testnet",
coinbase: false,
mintIndex: 1,
spentTxid: "",
mintTxid:
"5fe9b74056319a8c87f45cc745030715a6180758b94938dbf90d639d55652392",
mintHeight: 1265275,
spentHeight: -2,
address: "qq89kjkeqz9mngp8kl3dpmu43y2wztdjqu500gn4c4",
script: "76a9140e5b4ad9008bb9a027b7e2d0ef958914e12db20788ac",
value: 10000000,
confirmations: -1
}
]
module.exports = {
mockBalance,
mockUtxos
}