Skip to content

Commit

Permalink
fix(balancesForAddress): fix mocking bug in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
christroutner committed Dec 16, 2019
1 parent 9829373 commit 28a1c35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ describe("#Utils", () => {
])
})

it(`should fetch balances for multiple addresses.`, async () => {
it(`should fetch balances for multiple addresses`, async () => {
const addresses = [
"simpleledger:qzv3zz2trz0xgp6a96lu4m6vp2nkwag0kvyucjzqt9",
"simpleledger:qqss4zp80hn6szsa4jg2s9fupe7g5tcg5ucdyl3r57"
Expand All @@ -210,12 +210,12 @@ describe("#Utils", () => {
// Mock the call to rest.bitcoin.com
if (process.env.TEST === "unit") {
sandbox
.stub(axios, "get")
.stub(axios, "post")
.resolves({ data: mockData.balancesForAddresses })
}

const balances = await SLP.Utils.balancesForAddress(addresses)
//console.log(`balances: ${JSON.stringify(balances, null, 2)}`)
// console.log(`balances: ${JSON.stringify(balances, null, 2)}`)

assert2.isArray(balances)
assert2.isArray(balances[0])
Expand Down

0 comments on commit 28a1c35

Please sign in to comment.