From 662e53aaa2786be019838ac4b3258c9127868462 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Thu, 13 Aug 2020 15:44:26 -0700 Subject: [PATCH] debugging ninsight test --- test/integration/ninsight.js | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/test/integration/ninsight.js b/test/integration/ninsight.js index 8934617..726d677 100644 --- a/test/integration/ninsight.js +++ b/test/integration/ninsight.js @@ -12,26 +12,30 @@ describe(`#Ninsight`, () => { describe(`#utxo`, () => { it(`should GET utxos for a single address`, async () => { - const addr = "bitcoincash:qqh793x9au6ehvh7r2zflzguanlme760wuzehgzjh9" + try { + const addr = "bitcoincash:qqh793x9au6ehvh7r2zflzguanlme760wuzehgzjh9" - const result = await bchjs.Ninsight.utxo(addr) - // console.log(`result: ${JSON.stringify(result, null, 2)}`) + const result = await bchjs.Ninsight.utxo(addr) + // console.log(`result: ${JSON.stringify(result, null, 2)}`) - assert.property(result, "utxos") - assert.property(result, "legacyAddress") - assert.property(result, "cashAddress") - assert.property(result, "slpAddress") - assert.property(result, "scriptPubKey") - assert.property(result, "asm") + assert.property(result, "utxos") + assert.property(result, "legacyAddress") + assert.property(result, "cashAddress") + assert.property(result, "slpAddress") + assert.property(result, "scriptPubKey") + assert.property(result, "asm") - assert.isArray(result.utxos) + assert.isArray(result.utxos) - assert.property(result.utxos[0], "txid") - assert.property(result.utxos[0], "vout") - assert.property(result.utxos[0], "amount") - assert.property(result.utxos[0], "satoshis") - assert.property(result.utxos[0], "height") - assert.property(result.utxos[0], "confirmations") + assert.property(result.utxos[0], "txid") + assert.property(result.utxos[0], "vout") + assert.property(result.utxos[0], "amount") + assert.property(result.utxos[0], "satoshis") + assert.property(result.utxos[0], "height") + assert.property(result.utxos[0], "confirmations") + } catch (err) { + console.error("Error in test: ", err) + } }) it(`should POST utxo details for an array of addresses`, async () => {