-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from tiagosiebler/jerko
feat(): Added public tests
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { CBExchangeClient } from '../../src/index.js'; | ||
|
||
describe('CBExchangeClient PUBLIC', () => { | ||
const rest = new CBExchangeClient(); | ||
|
||
describe('public endpoints', () => { | ||
it('should succeed making a GET request', async () => { | ||
const res = await rest.getProductBook({ product_id: 'BTC-USDT' }); | ||
console.log(res); | ||
expect(res).toMatchObject({ | ||
bids: expect.any(Array), | ||
asks: expect.any(Array), | ||
sequence: expect.any(Number), | ||
auction_mode: expect.any(Boolean), | ||
auction: expect.any(Object), | ||
time: expect.any(String), | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { CBInternationalClient } from '../../src/index.js'; | ||
|
||
describe('CBInternationalClient PUBLIC', () => { | ||
const rest = new CBInternationalClient(); | ||
|
||
describe('public endpoints', () => { | ||
it('should succeed making a GET request', async () => { | ||
const res = await rest.getHistoricalFundingRates({ | ||
instrument: 'BTC-PERP', | ||
}); | ||
console.log(res); | ||
expect(res).toMatchObject({ | ||
pagination: expect.any(Object), | ||
results: expect.any(Array), | ||
}); | ||
}); | ||
}); | ||
}); |