Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trout@pop-os:~/work/bch/bitbox-sdk$ npm run test:integration:emil
- > [email protected] test:integration:emil /home/trout/work/bch/bitbox-sdk
- > TEST=integration SERVER=https://rest.api.bitcoin.com/v2/ nyc --reporter=text mocha --timeout 30000 test/integration --exit
- #address
- #details
- calling https://rest.api.bitcoin.com/v2/
- ✓ should GET address details for a single address (1198ms)
- calling https://rest.api.bitcoin.com/v2/
- ✓ should GET address details for an array of addresses (1228ms)
- calling https://rest.api.bitcoin.com/v2/
- ✓ should throw an error for improper input
- calling https://rest.api.bitcoin.com/v2/
- ✓ should throw error on array size rate limit (629ms)
- #utxo
- ✓ should GET utxos for a single address (911ms)
- ✓ should GET utxo details for an array of addresses (789ms)
- ✓ should throw an error for improper input
- ✓ should throw error on array size rate limit (1058ms)
- #unconfirmed
- ✓ should GET unconfirmed details on a single address (716ms)
- ✓ should GET unconfirmed details on multiple addresses (816ms)
- ✓ should throw an error for improper input
- ✓ should throw error on array size rate limit (731ms)
- #transactions
- 1) should GET transactions for a single address
- 2) should get transactions on multiple addresses
- ✓ should throw an error for improper input
- ✓ should throw error on array size rate limit (813ms)
- #block
- #detailsByHeight
- ✓ should GET block details for a given Height (1403ms)
- ✓ should GET block details for an array of blocks (1063ms)
- ✓ should throw an error for improper single input
- ✓ should throw error on array size rate limit (896ms)
- #detailsByHash
- ✓ should GET block details for a given hash (845ms)
- ✓ should GET block details for an array of hashes (3250ms)
- ✓ should throw an error for improper single input
- ✓ should throw error on array size rate limit (1120ms)
- #blockchain
- #getBestBlockHash
- ✓ should GET best block hash (817ms)
- #getBlockHeader
- ✓ should GET block header for a single hash (717ms)
- ✓ should GET block headers for an array of hashes (819ms)
- ✓ should throw an error for improper input
- ✓ should throw error on array size rate limit (638ms)
- #getMempoolEntry
- ✓ should throw an error if txid is not in mempool (791ms)
- ✓ should throw an error for improper single input
- #getTxOutProof
- ✓ should get single tx out proof (918ms)
- ✓ should get an array of tx out proofs (1434ms)
- ✓ should throw an error for improper single input
- #verifyTxOutProof
- ✓ should verify a single proof (917ms)
- ✓ should verify an array of proofs (922ms)
- ✓ should throw an error for improper single input
- ✓ should throw error on array size rate limit (1326ms)
- #control
- #getNetworkInfo
- ✓ should GET getNetworkInfo data (836ms)
- #price
- #current
- #single currency
- ✓ should get current price for single currency (1445ms)
- #rawtransaction
- #decodeRawTransaction
- ✓ should decode tx for a single hex (774ms)
- ✓ should decode an array of tx hexes (757ms)
- ✓ should throw an error for improper single input
- ✓ should throw error on array size rate limit (1011ms)
- #getRawTransaction
- ✓ should decode a single txid, with concise output (896ms)
- ✓ should decode a single txid, with verbose output (747ms)
- ✓ should decode an array of txids, with a concise output (992ms)
- ✓ should decode an array of txids, with a verbose output (982ms)
- ✓ should throw error on array size rate limit (965ms)
- #decodeScript
- ✓ should decode script for a single hex (814ms)
- sendRawTransaction
- ✓ should send a single transaction hex (737ms)
- ✓ should send an array of tx hexes (920ms)
- ✓ should throw an error for improper single input
- ✓ should throw error on array size rate limit (735ms)
- #Transaction
- #details
- ✓ should GET details for a given txid (721ms)
- ✓ should GET details for an array of txids (743ms)
- ✓ should throw an error for improper single input
- err: { error: 'Array too large.' }
- ✓ should throw error on array size rate limit (950ms)
- #util
- #validateAddress
- ✓ should return false for testnet addr on mainnet (625ms)
- ✓ should return false for bad address (781ms)
- 3) should return validate valid address
- 4) should validate an array of addresses
- ✓ should throw an error for improper single input
- ✓ should throw error on array size rate limit (1100ms)
- #sweep
- result: 0
- ✓ should return balance only (1118ms)
- result: 0
- ✓ should sweep funds (916ms)
- #rate-limits
- Unexpected error:
- 5) should throw an error when RPM rate limits are triggered
- 62 passing (59s)
- 5 failing
- 1) #address
- #transactions
- should GET transactions for a single address:
- TypeError: Cannot convert undefined or null to object
- at Function.keys (<anonymous>)
- at Object.getOwnEnumerableProperties (node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js:28:17)
- at Proxy.assertKeys (node_modules/chai/lib/chai/core/assertions.js:2347:18)
- at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
- at Function.assert.hasAnyKeys (node_modules/chai/lib/chai/interface/assert.js:1707:66)
- at Context.it (test/integration/address.js:292:14)
- at process._tickCallback (internal/process/next_tick.js:68:7)
- 2) #address
- #transactions
- should get transactions on multiple addresses:
- TypeError: Cannot convert undefined or null to object
- at Function.keys (<anonymous>)
- at Object.getOwnEnumerableProperties (node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js:28:17)
- at Proxy.assertKeys (node_modules/chai/lib/chai/core/assertions.js:2347:18)
- at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
- at Function.assert.hasAnyKeys (node_modules/chai/lib/chai/interface/assert.js:1707:66)
- at Context.it (test/integration/address.js:326:14)
- at process._tickCallback (internal/process/next_tick.js:68:7)
- 3) #util
- #validateAddress
- should return validate valid address:
- AssertionError: expected { Object (isvalid, address, ...) } to have keys 'isvalid', 'address', 'scriptPubKey', 'ismine', 'iswatchonly', and 'isscript'
- + expected - actual
- [
- "address"
- + "ismine"
- + "isscript"
- "isvalid"
- + "iswatchonly"
- "scriptPubKey"
- ]
- at Context.it (test/integration/util.js:55:14)
- at process._tickCallback (internal/process/next_tick.js:68:7)
- 4) #util
- #validateAddress
- should validate an array of addresses:
- AssertionError: expected { Object (isvalid, address, ...) } to have keys 'isvalid', 'address', 'scriptPubKey', 'ismine', 'iswatchonly', and 'isscript'
- + expected - actual
- [
- "address"
- + "ismine"
- + "isscript"
- "isvalid"
- + "iswatchonly"
- "scriptPubKey"
- ]
- at Context.it (test/integration/util.js:76:14)
- at process._tickCallback (internal/process/next_tick.js:68:7)
- 5) #rate-limits
- should throw an error when RPM rate limits are triggered:
- Unexpected error
- + expected - actual
- -true
- +false
- at Context.it (test/integration/z9-rate-limits.js:51:16)
- at process._tickCallback (internal/process/next_tick.js:68:7)
Advertisement
Add Comment
Please, Sign In to add comment