chore(): route tests via proxy instead of github CI address

This commit is contained in:
tiagosiebler
2023-08-18 16:21:13 +01:00
parent 9bc1ff89c6
commit 21ac313f38
37 changed files with 581 additions and 415 deletions

View File

@@ -1,4 +1,5 @@
import { USDCOptionClient } from '../../../src';
import { getTestProxy } from '../../proxy.util';
import {
successResponseObject,
successResponseObjectV3,
@@ -8,46 +9,49 @@ describe('Public USDC Options REST API Endpoints', () => {
const API_KEY = undefined;
const API_SECRET = undefined;
const api = new USDCOptionClient({
key: API_KEY,
secret: API_SECRET,
testnet: false,
});
const api = new USDCOptionClient(
{
key: API_KEY,
secret: API_SECRET,
testnet: false,
},
getTestProxy(),
);
const symbol = 'BTC-30SEP22-400000-C';
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('getDeliveryPrice()', async () => {
expect(await api.getDeliveryPrice()).toMatchObject(
successResponseObjectV3()
successResponseObjectV3(),
);
});
it('getLast500Trades()', async () => {
expect(await api.getLast500Trades({ category: 'OPTION' })).toMatchObject(
successResponseObjectV3()
successResponseObjectV3(),
);
});
it('getHistoricalVolatility()', async () => {
expect(await api.getHistoricalVolatility()).toMatchObject(
successResponseObjectV3()
successResponseObjectV3(),
);
});