fix(price): Refactored price and integration tests

This commit is contained in:
Chris Troutner
2025-11-17 10:13:53 -08:00
parent 857b57240e
commit 4dabdac792
3 changed files with 0 additions and 127 deletions
-1
View File
@@ -385,7 +385,6 @@ describe('#ElectrumX', () => {
assert.isAbove(sortedTransactions[0].height, sortedTransactions[1].height)
})
})
})
function sleep (ms) {
-37
View File
@@ -8,33 +8,6 @@ describe('#price', () => {
if (process.env.IS_USING_FREE_TIER) await sleep(1500)
})
// 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)
})
})
describe('#getBchaUsd', () => {
it('should get the USD price of BCHA', async () => {
const result = await bchjs.Price.getBchaUsd()
console.log(result)
assert.isNumber(result)
})
})
describe('#getBchUsd', () => {
it('should get the USD price of BCH', async () => {
const result = await bchjs.Price.getBchUsd()
@@ -44,16 +17,6 @@ describe('#price', () => {
})
})
describe('#rates', () => {
it('should get the price of BCH in several currencies', async () => {
const result = await bchjs.Price.rates()
// console.log(result)
assert.property(result, 'USD')
assert.property(result, 'CAD')
})
})
describe('#getPsffppPrice', () => {
it('should get the price of BCH in several currencies', async () => {
const result = await bchjs.Price.getPsffppPrice()