fix(utxo.get()): Fixing ABC integration test

This commit is contained in:
Chris Troutner
2021-02-15 15:12:39 -08:00
parent 7274475898
commit b3be470c0e
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -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: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: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: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/", "test:temp2": "mocha --timeout=30000 -g '#Util' test/unit/",
"coverage": "nyc report --reporter=text-lcov | coveralls", "coverage": "nyc report --reporter=text-lcov | coveralls",
"coverage:report": "nyc --reporter=html mocha --timeout 25000 test/unit/", "coverage:report": "nyc --reporter=html mocha --timeout 25000 test/unit/",
@@ -22,9 +22,13 @@ describe('#UTXO', () => {
const result = await bchjs.Utxo.get(addr) const result = await bchjs.Utxo.get(addr)
// console.log(`result: ${JSON.stringify(result, null, 2)}`) // console.log(`result: ${JSON.stringify(result, null, 2)}`)
assert.isArray(result.bchUtxos) assert.isArray(result)
assert.isArray(result.slpUtxos) assert.property(result[0], 'address')
assert.isArray(result.nullUtxos) 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)
}) })
}) })
}) })