refactor tests for new constructor pattern
This commit is contained in:
@@ -2,7 +2,6 @@ import { USDCOptionClient } from '../../../src';
|
||||
import { successResponseObjectV3 } from '../../response.util';
|
||||
|
||||
describe('Private USDC Options REST API GET Endpoints', () => {
|
||||
const useLivenet = true;
|
||||
const API_KEY = process.env.API_KEY_COM;
|
||||
const API_SECRET = process.env.API_SECRET_COM;
|
||||
const symbol = 'BTC-30SEP22-400000-C';
|
||||
@@ -12,7 +11,11 @@ describe('Private USDC Options REST API GET Endpoints', () => {
|
||||
expect(API_SECRET).toStrictEqual(expect.any(String));
|
||||
});
|
||||
|
||||
const api = new USDCOptionClient(API_KEY, API_SECRET, useLivenet);
|
||||
const api = new USDCOptionClient({
|
||||
key: API_KEY,
|
||||
secret: API_SECRET,
|
||||
testnet: false,
|
||||
});
|
||||
const category = 'OPTION';
|
||||
|
||||
it('getActiveRealtimeOrders()', async () => {
|
||||
|
||||
@@ -2,7 +2,6 @@ import { API_ERROR_CODE, USDCOptionClient } from '../../../src';
|
||||
import { successResponseObjectV3 } from '../../response.util';
|
||||
|
||||
describe('Private USDC Options REST API POST Endpoints', () => {
|
||||
const useLivenet = true;
|
||||
const API_KEY = process.env.API_KEY_COM;
|
||||
const API_SECRET = process.env.API_SECRET_COM;
|
||||
|
||||
@@ -11,7 +10,11 @@ describe('Private USDC Options REST API POST Endpoints', () => {
|
||||
expect(API_SECRET).toStrictEqual(expect.any(String));
|
||||
});
|
||||
|
||||
const api = new USDCOptionClient(API_KEY, API_SECRET, useLivenet);
|
||||
const api = new USDCOptionClient({
|
||||
key: API_KEY,
|
||||
secret: API_SECRET,
|
||||
testnet: false,
|
||||
});
|
||||
|
||||
const currency = 'USDC';
|
||||
const symbol = 'BTC-30SEP22-400000-C';
|
||||
|
||||
@@ -5,11 +5,14 @@ import {
|
||||
} from '../../response.util';
|
||||
|
||||
describe('Public USDC Options REST API Endpoints', () => {
|
||||
const useLivenet = true;
|
||||
const API_KEY = undefined;
|
||||
const API_SECRET = undefined;
|
||||
|
||||
const api = new USDCOptionClient(API_KEY, API_SECRET, useLivenet);
|
||||
const api = new USDCOptionClient({
|
||||
key: API_KEY,
|
||||
secret: API_SECRET,
|
||||
testnet: false,
|
||||
});
|
||||
const symbol = 'BTC-30SEP22-400000-C';
|
||||
|
||||
it('getOrderBook()', async () => {
|
||||
|
||||
@@ -2,7 +2,6 @@ import { USDCPerpetualClient } from '../../../src';
|
||||
import { successResponseObjectV3 } from '../../response.util';
|
||||
|
||||
describe('Private USDC Perp REST API GET Endpoints', () => {
|
||||
const useLivenet = true;
|
||||
const API_KEY = process.env.API_KEY_COM;
|
||||
const API_SECRET = process.env.API_SECRET_COM;
|
||||
|
||||
@@ -11,7 +10,11 @@ describe('Private USDC Perp REST API GET Endpoints', () => {
|
||||
expect(API_SECRET).toStrictEqual(expect.any(String));
|
||||
});
|
||||
|
||||
const api = new USDCPerpetualClient(API_KEY, API_SECRET, useLivenet);
|
||||
const api = new USDCPerpetualClient({
|
||||
key: API_KEY,
|
||||
secret: API_SECRET,
|
||||
testnet: false,
|
||||
});
|
||||
|
||||
const symbol = 'BTCPERP';
|
||||
const category = 'PERPETUAL';
|
||||
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
} from '../../response.util';
|
||||
|
||||
describe('Private USDC Perp REST API POST Endpoints', () => {
|
||||
const useLivenet = true;
|
||||
const API_KEY = process.env.API_KEY_COM;
|
||||
const API_SECRET = process.env.API_SECRET_COM;
|
||||
|
||||
@@ -14,7 +13,11 @@ describe('Private USDC Perp REST API POST Endpoints', () => {
|
||||
expect(API_SECRET).toStrictEqual(expect.any(String));
|
||||
});
|
||||
|
||||
const api = new USDCPerpetualClient(API_KEY, API_SECRET, useLivenet);
|
||||
const api = new USDCPerpetualClient({
|
||||
key: API_KEY,
|
||||
secret: API_SECRET,
|
||||
testnet: false,
|
||||
});
|
||||
|
||||
const symbol = 'BTCPERP';
|
||||
|
||||
|
||||
@@ -5,11 +5,14 @@ import {
|
||||
} from '../../response.util';
|
||||
|
||||
describe('Public USDC Perp REST API Endpoints', () => {
|
||||
const useLivenet = true;
|
||||
const API_KEY = undefined;
|
||||
const API_SECRET = undefined;
|
||||
|
||||
const api = new USDCPerpetualClient(API_KEY, API_SECRET, useLivenet);
|
||||
const api = new USDCPerpetualClient({
|
||||
key: API_KEY,
|
||||
secret: API_SECRET,
|
||||
testnet: false,
|
||||
});
|
||||
|
||||
const symbol = 'BTCPERP';
|
||||
const category = 'PERPETUAL';
|
||||
|
||||
Reference in New Issue
Block a user