Files
bch-js/test/integration/price.js
T

24 lines
603 B
JavaScript
Raw Normal View History

const assert = require("chai").assert
2020-07-27 21:32:51 -07:00
const BCHJS = require("../../src/bch-js")
const bchjs = new BCHJS()
describe("#price", () => {
describe("#current", () => {
describe("#single currency", () => {
it("should get current price for single currency", async () => {
const result = await bchjs.Price.current("usd")
assert.notEqual(0, result)
})
})
})
describe("#getUsd", () => {
it("should get the USD price of BCH", async () => {
const result = await bchjs.Price.getUsd()
// console.log(result)
assert.isNumber(result.usd)
})
})
2020-07-27 21:32:51 -07:00
})