fix tests from refactoring
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import { USDCOptionClient } from '../../../src';
|
||||
import {
|
||||
successResponseObject,
|
||||
successUSDCResponseObject,
|
||||
} from '../../response.util';
|
||||
import { successResponseObjectV3 } from '../../response.util';
|
||||
|
||||
describe('Private Account Asset REST API Endpoints', () => {
|
||||
const useLivenet = true;
|
||||
@@ -20,63 +17,61 @@ describe('Private Account Asset REST API Endpoints', () => {
|
||||
|
||||
it('getActiveRealtimeOrders()', async () => {
|
||||
expect(await api.getActiveRealtimeOrders()).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
it('getActiveOrders()', async () => {
|
||||
expect(await api.getActiveOrders({ category })).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
it('getHistoricOrders()', async () => {
|
||||
expect(await api.getHistoricOrders({ category })).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
it('getOrderExecutionHistory()', async () => {
|
||||
expect(await api.getOrderExecutionHistory({ category })).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
it('getTransactionLog()', async () => {
|
||||
expect(await api.getTransactionLog({ type: 'TRADE' })).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
it('getBalances()', async () => {
|
||||
expect(await api.getBalances()).toMatchObject(successUSDCResponseObject());
|
||||
expect(await api.getBalances()).toMatchObject(successResponseObjectV3());
|
||||
});
|
||||
|
||||
it('getAssetInfo()', async () => {
|
||||
expect(await api.getAssetInfo()).toMatchObject(successUSDCResponseObject());
|
||||
expect(await api.getAssetInfo()).toMatchObject(successResponseObjectV3());
|
||||
});
|
||||
|
||||
it('getMarginMode()', async () => {
|
||||
expect(await api.getMarginMode()).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
);
|
||||
expect(await api.getMarginMode()).toMatchObject(successResponseObjectV3());
|
||||
});
|
||||
|
||||
it('getPositions()', async () => {
|
||||
expect(await api.getPositions({ category })).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
it('getDeliveryHistory()', async () => {
|
||||
expect(await api.getDeliveryHistory({ symbol })).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
it('getPositionsInfoUponExpiry()', async () => {
|
||||
expect(await api.getPositionsInfoUponExpiry()).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { API_ERROR_CODE, USDCOptionClient } from '../../../src';
|
||||
import { successUSDCResponseObject } from '../../response.util';
|
||||
import { successResponseObjectV3 } from '../../response.util';
|
||||
|
||||
describe('Private Account Asset REST API Endpoints', () => {
|
||||
const useLivenet = true;
|
||||
@@ -132,7 +132,7 @@ describe('Private Account Asset REST API Endpoints', () => {
|
||||
|
||||
it('setMarginMode()', async () => {
|
||||
expect(await api.setMarginMode('REGULAR_MARGIN')).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { USDCOptionClient } from '../../../src';
|
||||
import {
|
||||
successResponseObject,
|
||||
successUSDCResponseObject,
|
||||
successResponseObjectV3,
|
||||
} from '../../response.util';
|
||||
|
||||
describe('Public USDC Options REST API Endpoints', () => {
|
||||
@@ -14,37 +14,37 @@ describe('Public USDC Options REST API Endpoints', () => {
|
||||
|
||||
it('getOrderBook()', async () => {
|
||||
expect(await api.getOrderBook(symbol)).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
it('getContractInfo()', async () => {
|
||||
expect(await api.getContractInfo()).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
it('getSymbolTicker()', async () => {
|
||||
expect(await api.getSymbolTicker(symbol)).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
it('getDeliveryPrice()', async () => {
|
||||
expect(await api.getDeliveryPrice()).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
it('getLast500Trades()', async () => {
|
||||
expect(await api.getLast500Trades({ category: 'OPTION' })).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
it('getHistoricalVolatility()', async () => {
|
||||
expect(await api.getHistoricalVolatility()).toMatchObject(
|
||||
successUSDCResponseObject()
|
||||
successResponseObjectV3()
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user