From b3be470c0e4ba1bb19f6ffc069166ef0ec6daa59 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Mon, 15 Feb 2021 15:12:39 -0800 Subject: [PATCH] fix(utxo.get()): Fixing ABC integration test --- package.json | 2 +- test/integration/chains/abc/utxo-integration.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ebe4819..57ca6b7 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "test:integration:local:abc": "export RESTURL=http://localhost:3000/v4/ && mocha --timeout 30000 test/integration && mocha --timeout 30000 test/integration/chains/abc/", "test:integration:local:bchn": "export RESTURL=http://localhost:3000/v4/ && mocha --timeout 30000 test/integration/ && mocha --timeout 30000 test/integration/chains/bchn/", "test:integration:local:testnet": "RESTURL=http://localhost:4000/v4/ mocha --timeout 30000 test/integration/chains/testnet", - "test:temp": "export RESTURL=https://bchn.fullstack.cash/v4/ && mocha --timeout 30000 -g '#UTXO' test/integration/chains/bchn/", + "test:temp": "export RESTURL=https://abc.fullstack.cash/v4/ && mocha --timeout 30000 -g '#UTXO' test/integration/chains/abc/", "test:temp2": "mocha --timeout=30000 -g '#Util' test/unit/", "coverage": "nyc report --reporter=text-lcov | coveralls", "coverage:report": "nyc --reporter=html mocha --timeout 25000 test/unit/", diff --git a/test/integration/chains/abc/utxo-integration.js b/test/integration/chains/abc/utxo-integration.js index ab856fc..1fb5655 100644 --- a/test/integration/chains/abc/utxo-integration.js +++ b/test/integration/chains/abc/utxo-integration.js @@ -22,9 +22,13 @@ describe('#UTXO', () => { const result = await bchjs.Utxo.get(addr) // console.log(`result: ${JSON.stringify(result, null, 2)}`) - assert.isArray(result.bchUtxos) - assert.isArray(result.slpUtxos) - assert.isArray(result.nullUtxos) + assert.isArray(result) + assert.property(result[0], 'address') + assert.property(result[0], 'bchUtxos') + assert.property(result[0], 'nullUtxos') + assert.property(result[0], 'slpUtxos') + assert.isArray(result[0].bchUtxos) + assert.isArray(result[0].nullUtxos) }) }) })