diff --git a/test/integration/bchn/ninsight.js b/test/integration/bchn/ninsight.js index 0bc57b4..748624c 100644 --- a/test/integration/bchn/ninsight.js +++ b/test/integration/bchn/ninsight.js @@ -143,11 +143,13 @@ describe(`#Ninsight`, () => { } }) - it(`should GET details for a single address`, async () => { + it(`should POST address details for a single address`, async () => { const addr = "bitcoincash:qp3sn6vlwz28ntmf3wmyra7jqttfx7z6zgtkygjhc7" const result = await bchjs.Ninsight.details(addr) //console.log(`result: ${JSON.stringify(result, null, 2)}`) + + assert.isArray(result) assert.property(result[0], "balance") assert.property(result[0], "balanceSat") assert.property(result[0], "totalReceived") @@ -166,7 +168,7 @@ describe(`#Ninsight`, () => { assert.property(result[0], "pagesTotal") }) - it(`should GET details for an array of addresses`, async () => { + it(`should POST address details for an array of addresses`, async () => { const addr = [ "bitcoincash:qp3sn6vlwz28ntmf3wmyra7jqttfx7z6zgtkygjhc7", "bitcoincash:qz0us0z6ucpqt07jgpad0shgh7xmwxyr3ynlcsq0wr" diff --git a/test/integration/ninsight.js b/test/integration/ninsight.js index b9286ed..4a4aad1 100644 --- a/test/integration/ninsight.js +++ b/test/integration/ninsight.js @@ -149,11 +149,12 @@ describe(`#Ninsight`, () => { } }) - it(`should GET details for a single address`, async () => { + it(`should POST address details for a single address`, async () => { const addr = "bitcoincash:qp3sn6vlwz28ntmf3wmyra7jqttfx7z6zgtkygjhc7" const result = await bchjs.Ninsight.details(addr) //console.log(`result: ${JSON.stringify(result, null, 2)}`) + assert.isArray(result) assert.property(result[0], "balance") assert.property(result[0], "balanceSat") assert.property(result[0], "totalReceived") @@ -172,7 +173,7 @@ describe(`#Ninsight`, () => { assert.property(result[0], "pagesTotal") }) - it(`should GET details for an array of addresses`, async () => { + it(`should POST address details for an array of addresses`, async () => { const addr = [ "bitcoincash:qp3sn6vlwz28ntmf3wmyra7jqttfx7z6zgtkygjhc7", "bitcoincash:qz0us0z6ucpqt07jgpad0shgh7xmwxyr3ynlcsq0wr" diff --git a/test/integration/testnet/ninsight.js b/test/integration/testnet/ninsight.js index 7818d39..f6ed64d 100644 --- a/test/integration/testnet/ninsight.js +++ b/test/integration/testnet/ninsight.js @@ -158,11 +158,12 @@ describe(`#Ninsight`, () => { } }) - it(`should GET details for a single address`, async () => { + it(`should POST address details for a single address`, async () => { const addr = "bchtest:qzjtnzcvzxx7s0na88yrg3zl28wwvfp97538sgrrmr" const result = await bchjs.Ninsight.details(addr) //console.log(`result: ${JSON.stringify(result, null, 2)}`) + assert.isArray(result) assert.property(result[0], "balance") assert.property(result[0], "balanceSat") assert.property(result[0], "totalReceived") @@ -181,7 +182,7 @@ describe(`#Ninsight`, () => { assert.property(result[0], "pagesTotal") }) - it(`should GET details for an array of addresses`, async () => { + it(`should POST address details for an array of addresses`, async () => { const addr = [ "bchtest:qzjtnzcvzxx7s0na88yrg3zl28wwvfp97538sgrrmr", "bchtest:qp6hgvevf4gzz6l7pgcte3gaaud9km0l459fa23dul" diff --git a/test/unit/ninsight.js b/test/unit/ninsight.js index 4453776..331ec9f 100644 --- a/test/unit/ninsight.js +++ b/test/unit/ninsight.js @@ -312,6 +312,10 @@ describe(`#Ninsight`, () => { assert.property(result, "pagesTotal") }) + it(`should call constructor with null args`, async () => { + new bchjs.Ninsight.constructor({}) + }) + it(`should GET details for an array of addresses`, async () => { // Mock the network call. sandbox.stub(axios, "post").resolves({