Skip to content

Commit

Permalink
* Move mocha types dep to dev dependencies per this issue: #120
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Cardona committed Jun 19, 2019
1 parent 561a164 commit bcf7ae3
Show file tree
Hide file tree
Showing 3 changed files with 364 additions and 272 deletions.
5 changes: 0 additions & 5 deletions lib/Blockchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ export class Blockchain {

// Handle array of hashes.
} else if (Array.isArray(hash)) {

// Dev note: must use axios.post for unit test stubbing.
const response: AxiosResponse = await axios.post(
`${this.restURL}blockchain/getBlockHeader`,
Expand Down Expand Up @@ -188,8 +187,6 @@ export class Blockchain {
public async getMempoolEntry(
txid: string | string[]
): Promise<MempoolEntryResult> {
//if (typeof txid !== "string") txid = JSON.stringify(txid)

try {
if (typeof txid === "string") {
const response: AxiosResponse = await axios.get(
Expand Down Expand Up @@ -275,7 +272,6 @@ export class Blockchain {

// Array of txids.
} else if (Array.isArray(txids)) {

// Dev note: must use axios.post for unit test stubbing.
const response: AxiosResponse = await axios.post(
`${this.restURL}blockchain/getTxOutProof`,
Expand Down Expand Up @@ -348,7 +344,6 @@ export class Blockchain {

// Array of hashes.
} else if (Array.isArray(proof)) {

// Dev note: must use axios.post for unit test stubbing.
const response: AxiosResponse = await axios.post(
`${this.restURL}blockchain/verifyTxOutProof`,
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bitbox-sdk",
"version": "8.4.1",
"version": "8.4.2",
"description": "BITBOX SDK for Bitcoin Cash",
"author": "Gabriel Cardona <[email protected]>",
"contributors": [
Expand All @@ -10,7 +10,7 @@
"test": "npm run test:unit",
"test:no-build": "nyc mocha test/unit --timeout 60000 --exit",
"test:unit": "tsc && nyc mocha test/unit --timeout 60000 --exit",
"test:integration": "TEST=integration nyc --reporter=text mocha --timeout 30000 test/integration",
"test:integration": "TEST=integration nyc --reporter=text mocha --timeout 30000 test/integration --exit",
"test:integration:local": "TEST=integration SERVER=local nyc --reporter=text mocha --timeout 30000 test/integration --exit",
"test:integration:stage": "TEST=integration SERVER=stage nyc --reporter=text mocha --timeout 30000 test/integration --exit",
"coverage": "nyc report --reporter=text-lcov | coveralls",
Expand All @@ -33,11 +33,8 @@
"dependencies": {
"@types/bigi": "^1.4.2",
"@types/bip39": "^2.4.2",
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.6",
"@types/node": "^10.11.7",
"@types/randombytes": "^2.0.0",
"@types/sinon": "^7.0.11",
"@types/wif": "^2.0.1",
"assert": "^1.4.1",
"axios": "0.19.0",
Expand Down Expand Up @@ -69,6 +66,9 @@
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^0.1.3",
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.6",
"@types/sinon": "^7.0.11",
"chai": "^4.1.2",
"coveralls": "^3.0.2",
"eslint": "^5.5.0",
Expand Down
Loading

0 comments on commit bcf7ae3

Please sign in to comment.