Skip to content

Commit

Permalink
Merge pull request #155 from Bitcoin-com/ct-fix-integration-tests
Browse files Browse the repository at this point in the history
Ct fix integration tests
  • Loading branch information
christroutner authored Nov 18, 2019
2 parents 287bade + 056fcc2 commit 08e8d92
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 64 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"node-mocks-http": "^1.7.0",
"nyc": "^14.1.1",
"prettier": "^1.14.2",
"semantic-release": "^15.13.3",
"semantic-release": "^15.13.31",
"sinon": "^4.5.0",
"source-map-support": "^0.5.12",
"ts-node": "^8.1.0",
Expand Down
12 changes: 8 additions & 4 deletions test/integration/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ describe(`#address`, () => {
"legacyAddress",
"cashAddress",
"scriptPubKey",
"slpAddress"
"slpAddress",
"asm"
])
assert.isArray(result.utxos)
assert.hasAnyKeys(result.utxos[0], [
Expand Down Expand Up @@ -158,7 +159,8 @@ describe(`#address`, () => {
"legacyAddress",
"cashAddress",
"scriptPubKey",
"slpAddress"
"slpAddress",
"asm"
])
assert.isArray(result[0].utxos)
assert.hasAnyKeys(result[0].utxos[0], [
Expand Down Expand Up @@ -215,7 +217,8 @@ describe(`#address`, () => {
"legacyAddress",
"cashAddress",
"scriptPubKey",
"slpAddress"
"slpAddress",
"asm"
])
assert.isArray(result.utxos)
})
Expand All @@ -235,7 +238,8 @@ describe(`#address`, () => {
"legacyAddress",
"cashAddress",
"scriptPubKey",
"slpAddress"
"slpAddress",
"asm"
])
assert.isArray(result[0].utxos)
})
Expand Down
8 changes: 8 additions & 0 deletions test/integration/other/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Other Integration Tests

This directory holds stand-alone integration tests that should not be part of
the integration test suite.

An example of a test that fits this criteria are rate limit tests. Rate limit
tests are complex, require a solid internet connection, and can easily disrupt
other tests. For those reasons, it is better to run them on their own.
2 changes: 1 addition & 1 deletion test/integration/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe(`#Transaction`, () => {
// console.log(`result: ${util.inspect(result)}`)
assert.equal(false, false, "Unexpected result!")
} catch (err) {
console.log(`err: ${util.inspect(err)}`)
// console.log(`err: ${util.inspect(err)}`)

assert.hasAnyKeys(err, ["error"])
assert.include(err.error, "Array too large")
Expand Down
6 changes: 1 addition & 5 deletions test/integration/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe(`#util`, () => {
assert.equal(result.isvalid, false)
})

it(`should return validate valid address`, async () => {
it(`should return a valid address`, async () => {
const address = `bitcoincash:qp4k8fjtgunhdr7yq30ha4peuwupzan2vcnwrmpy0z`

const result = await bitbox.Util.validateAddress(address)
Expand All @@ -54,8 +54,6 @@ describe(`#util`, () => {
"isvalid",
"address",
"scriptPubKey",
"ismine",
"iswatchonly",
"isscript"
])
assert.equal(result.isvalid, true)
Expand All @@ -75,8 +73,6 @@ describe(`#util`, () => {
"isvalid",
"address",
"scriptPubKey",
"ismine",
"iswatchonly",
"isscript"
])
})
Expand Down
53 changes: 0 additions & 53 deletions test/integration/z9-rate-limits.js

This file was deleted.

0 comments on commit 08e8d92

Please sign in to comment.