Skip to content

Commit 08e3fbf

Browse files
committed
test: cleanup
1 parent 9e2175d commit 08e3fbf

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/__tests__/blockchain.test.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ describe('Blockchain API Wrapper tests', () => {
4848

4949
it('should fetch block data by date in yyyy-mmd-dd', async () => {
5050
/// date yyyymmdd
51-
const date = '20231105'
51+
const date = '20220305'
5252
const block = await bitgesellBlockchainSDK.blockchain.getBlockDataByDate(date)
5353
expect(block).toBeDefined()
5454
})
5555

5656
it('should fetch blocks by given date', async () => {
5757
/// date yyyy-mmdd
58-
const date = '20231105'
58+
const date = '20220305'
5959
const block = await bitgesellBlockchainSDK.blockchain.getBlocksByDate(date)
6060
expect(block).toBeDefined()
6161
})
@@ -72,6 +72,7 @@ describe('Blockchain API Wrapper tests', () => {
7272
})
7373

7474
it('should fetch block UTXOs by block hash', async () => {
75+
const blockHeight = 300
7576
const block = await bitgesellBlockchainSDK.blockchain.getBlockUTXO(blockHeight)
7677
expect(block).toBeDefined()
7778
})

src/__tests__/mempool.test.ts

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ describe('Mempool tests', () => {
77
}
88

99
let bitgesellBlockchainSDK: BitgesellBlockchainSDK
10-
const bitgesellAddress = 'bgl1qlmzckh904vze03n0lwzptt5dkmvf2vj3ev4qm9'
1110

1211
beforeAll(() => {
1312
bitgesellBlockchainSDK = new BitgesellBlockchainSDK(sdkConfig)

src/__tests__/sdkConfig.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { SDKConfig } from '../types';
22

3-
export const sdkConfig = {
3+
export const sdkConfig: SDKConfig = {
44
baseAPIURL: 'https://api.bitaps.com/bgl/v1/blockchain',
55
logger: console.log
66
}

src/__tests__/transaction.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ describe('Transaction tests', () => {
1515
it('should get transaction merkel proof', async () => {
1616
const merkelProof = await bitgesellBlockchainSDK.tx.getTransactonMerkleProof(txHash)
1717
expect(merkelProof).toBeDefined()
18-
expect(merkelProof).toHaveProperty('merkle')
18+
expect(merkelProof).toHaveProperty('merkleProof')
1919
})
2020
})

src/types/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export type Block = {
66
adjustedTimestamp: number
77
}
88

9-
export type SDKConfig = {
9+
export interface SDKConfig {
1010
baseAPIURL: string
1111
logger?: (arg: string) => void
1212
apiKey?: string

0 commit comments

Comments
 (0)