Skip to content

Commit

Permalink
Merge pull request #14 from christroutner/unstable
Browse files Browse the repository at this point in the history
fix(tokenUtxoDetails): Fixed improperly stubbed unit test
  • Loading branch information
christroutner committed Mar 10, 2020
2 parents cde8153 + ed2860d commit 62432e0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/unit/slp-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const SLP = require("../../src/slp/slp")
//const slp = new SLP("http://decatur.hopto.org:12400/v3/")
//const slp = new SLP("https://rest.bitcoin.com/v2/")
const slp = new SLP({
restURL: "https://mainnet.bchjs.cash/v3/",
restURL: "https://api.fullstack.cash/v3/",
apiToken: process.env.BCHJSTOKEN
})

Expand Down Expand Up @@ -1176,10 +1176,12 @@ describe("#SLP Utils", () => {
})

it("should return false for BCH-only UTXOs", async () => {
// Mock the call to REST API
// Mock live network calls
if (process.env.TEST === "unit") {
// Stub the call to validateTxid
sandbox.stub(slp.Utils, "validateTxid").resolves([null, null])
sandbox
.stub(slp.Utils, "decodeOpReturn")
.throws(new Error("Not an OP_RETURN"))
// sandbox.stub(slp.Utils, "validateTxid").resolves([null, null])
}

const utxos = [
Expand Down

0 comments on commit 62432e0

Please sign in to comment.