diff --git a/test/CBExchangeClient/public.test.ts b/test/CBExchangeClient/public.test.ts new file mode 100644 index 0000000..c330c03 --- /dev/null +++ b/test/CBExchangeClient/public.test.ts @@ -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), + }); + }); + }); +}); diff --git a/test/CBInternationalClient/public.test.ts b/test/CBInternationalClient/public.test.ts new file mode 100644 index 0000000..4ff15a9 --- /dev/null +++ b/test/CBInternationalClient/public.test.ts @@ -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), + }); + }); + }); +});