fix(route-utils.js): getAxiosOptions() replaces setEnvVars()

This commit is contained in:
Chris Troutner
2020-01-27 14:50:00 -08:00
parent 5a13ba114f
commit 725adc1ce1
3 changed files with 49 additions and 18 deletions
+10 -6
View File
@@ -115,16 +115,20 @@ describe("#BlockchainRouter", () => {
)
})
// it("return proper error connection is refused", async () => {
//
// })
it("should GET /getBestBlockHash", async () => {
// Mock the RPC call for unit tests.
if (process.env.TEST === "unit") {
nock(`${process.env.RPC_BASEURL}`)
.post(uri => uri.includes("/"))
.reply(200, { result: mockData.mockBlockHash })
}
// if (process.env.TEST === "unit") {
// nock(`${process.env.RPC_BASEURL}`)
// .post(uri => uri.includes("/"))
// .reply(200, { result: mockData.mockBlockHash })
// }
const result = await getBestBlockHash(req, res)
//console.log(`result: ${util.inspect(result)}`)
console.log(`result: ${util.inspect(result)}`)
assert.isString(result)
assert.equal(result.length, 64, "Hash string is fixed length")