chore(): route tests via proxy instead of github CI address
This commit is contained in:
@@ -3,16 +3,20 @@ import {
|
||||
successResponseObject,
|
||||
successResponseObjectV3,
|
||||
} from '../../response.util';
|
||||
import { getTestProxy } from '../../proxy.util';
|
||||
|
||||
describe('Public USDC Perp REST API Endpoints', () => {
|
||||
const API_KEY = undefined;
|
||||
const API_SECRET = undefined;
|
||||
|
||||
const api = new USDCPerpetualClient({
|
||||
key: API_KEY,
|
||||
secret: API_SECRET,
|
||||
testnet: false,
|
||||
});
|
||||
const api = new USDCPerpetualClient(
|
||||
{
|
||||
key: API_KEY,
|
||||
secret: API_SECRET,
|
||||
testnet: false,
|
||||
},
|
||||
getTestProxy(),
|
||||
);
|
||||
|
||||
const symbol = 'BTCPERP';
|
||||
const category = 'PERPETUAL';
|
||||
@@ -22,73 +26,73 @@ describe('Public USDC Perp REST API Endpoints', () => {
|
||||
|
||||
it('getOrderBook()', async () => {
|
||||
expect(await api.getOrderBook(symbol)).toMatchObject(
|
||||
successResponseObjectV3()
|
||||
successResponseObjectV3(),
|
||||
);
|
||||
});
|
||||
|
||||
it('getContractInfo()', async () => {
|
||||
expect(await api.getContractInfo()).toMatchObject(
|
||||
successResponseObjectV3()
|
||||
successResponseObjectV3(),
|
||||
);
|
||||
});
|
||||
|
||||
it('getSymbolTicker()', async () => {
|
||||
expect(await api.getSymbolTicker(symbol)).toMatchObject(
|
||||
successResponseObjectV3()
|
||||
successResponseObjectV3(),
|
||||
);
|
||||
});
|
||||
|
||||
it('getCandles()', async () => {
|
||||
expect(await api.getCandles(candleRequest)).toMatchObject(
|
||||
successResponseObjectV3()
|
||||
successResponseObjectV3(),
|
||||
);
|
||||
});
|
||||
|
||||
it('getMarkPrice()', async () => {
|
||||
expect(await api.getMarkPrice(candleRequest)).toMatchObject(
|
||||
successResponseObjectV3()
|
||||
successResponseObjectV3(),
|
||||
);
|
||||
});
|
||||
|
||||
it('getIndexPrice()', async () => {
|
||||
expect(await api.getIndexPrice(candleRequest)).toMatchObject(
|
||||
successResponseObjectV3()
|
||||
successResponseObjectV3(),
|
||||
);
|
||||
});
|
||||
|
||||
it('getIndexPremium()', async () => {
|
||||
expect(await api.getIndexPremium(candleRequest)).toMatchObject(
|
||||
successResponseObjectV3()
|
||||
successResponseObjectV3(),
|
||||
);
|
||||
});
|
||||
|
||||
it('getOpenInterest()', async () => {
|
||||
expect(await api.getOpenInterest({ symbol, period: '1m' })).toMatchObject(
|
||||
successResponseObjectV3()
|
||||
successResponseObjectV3(),
|
||||
);
|
||||
});
|
||||
|
||||
it('getLargeOrders()', async () => {
|
||||
expect(await api.getLargeOrders({ symbol })).toMatchObject(
|
||||
successResponseObjectV3()
|
||||
successResponseObjectV3(),
|
||||
);
|
||||
});
|
||||
|
||||
it('getLongShortRatio()', async () => {
|
||||
expect(await api.getLongShortRatio({ symbol, period: '1m' })).toMatchObject(
|
||||
successResponseObjectV3()
|
||||
successResponseObjectV3(),
|
||||
);
|
||||
});
|
||||
|
||||
it('getLast500Trades()', async () => {
|
||||
expect(await api.getLast500Trades({ category })).toMatchObject(
|
||||
successResponseObjectV3()
|
||||
successResponseObjectV3(),
|
||||
);
|
||||
});
|
||||
|
||||
it('getLastFundingRate()', async () => {
|
||||
expect(await api.getLastFundingRate(symbol)).toMatchObject(
|
||||
successResponseObjectV3()
|
||||
successResponseObjectV3(),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user