address linter complaints
This commit is contained in:
@@ -16,7 +16,8 @@ describe('Private Spot REST API POST Endpoints', () => {
|
||||
testnet: false,
|
||||
});
|
||||
|
||||
// Warning: if some of these start to fail with 10001 params error, it's probably that this future expired and a newer one exists with a different symbol!
|
||||
// Warning: if some of these start to fail with 10001 params error,
|
||||
// it's probably that this future expired and a newer one exists with a different symbol!
|
||||
const symbol = 'BTCUSDT';
|
||||
|
||||
// These tests are primarily check auth is working by expecting balance or order not found style errors
|
||||
|
||||
@@ -21,7 +21,7 @@ describe('Private Spot REST API GET Endpoints', () => {
|
||||
});
|
||||
|
||||
const symbol = 'BTCUSDT';
|
||||
const interval = '15m';
|
||||
// const interval = '15m';
|
||||
const ltCode = 'BTC3S';
|
||||
|
||||
it('getOrder()', async () => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import { SpotClient } from '../../src';
|
||||
import {
|
||||
notAuthenticatedError,
|
||||
@@ -28,43 +30,39 @@ describe('Public Spot REST API Endpoints', () => {
|
||||
|
||||
it('getOrderBook()', async () => {
|
||||
expect(await api.getOrderBook(symbol)).toMatchObject(
|
||||
successResponseObject(null)
|
||||
successResponseObject()
|
||||
);
|
||||
});
|
||||
|
||||
it('getMergedOrderBook()', async () => {
|
||||
expect(await api.getMergedOrderBook(symbol)).toMatchObject(
|
||||
successResponseObject(null)
|
||||
successResponseObject()
|
||||
);
|
||||
});
|
||||
|
||||
it('getTrades()', async () => {
|
||||
expect(await api.getTrades(symbol)).toMatchObject(
|
||||
successResponseObject(null)
|
||||
);
|
||||
expect(await api.getTrades(symbol)).toMatchObject(successResponseObject());
|
||||
});
|
||||
|
||||
it('getCandles()', async () => {
|
||||
expect(await api.getCandles(symbol, interval)).toMatchObject(
|
||||
successResponseObject(null)
|
||||
successResponseObject()
|
||||
);
|
||||
});
|
||||
|
||||
it('get24hrTicker()', async () => {
|
||||
expect(await api.get24hrTicker()).toMatchObject(
|
||||
successResponseObject(null)
|
||||
);
|
||||
expect(await api.get24hrTicker()).toMatchObject(successResponseObject());
|
||||
});
|
||||
|
||||
it('getLastTradedPrice()', async () => {
|
||||
expect(await api.getLastTradedPrice()).toMatchObject(
|
||||
successResponseObject(null)
|
||||
successResponseObject()
|
||||
);
|
||||
});
|
||||
|
||||
it('getBestBidAskPrice()', async () => {
|
||||
expect(await api.getBestBidAskPrice()).toMatchObject(
|
||||
successResponseObject(null)
|
||||
successResponseObject()
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import { SpotClientV3 } from '../../src';
|
||||
import {
|
||||
notAuthenticatedError,
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import {
|
||||
WebsocketClient,
|
||||
WSClientConfigurableOptions,
|
||||
WS_KEY_MAP,
|
||||
WebsocketClient,
|
||||
} from '../../src';
|
||||
import {
|
||||
logAllEvents,
|
||||
promiseSleep,
|
||||
getSilentLogger,
|
||||
waitForSocketEvent,
|
||||
WS_OPEN_EVENT_PARTIAL,
|
||||
fullLogger,
|
||||
getSilentLogger,
|
||||
logAllEvents,
|
||||
promiseSleep,
|
||||
waitForSocketEvent,
|
||||
} from '../ws.util';
|
||||
|
||||
describe('Private Spot V1 Websocket Client', () => {
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import {
|
||||
WebsocketClient,
|
||||
WSClientConfigurableOptions,
|
||||
WS_ERROR_ENUM,
|
||||
WS_KEY_MAP,
|
||||
WebsocketClient,
|
||||
} from '../../src';
|
||||
import {
|
||||
WS_OPEN_EVENT_PARTIAL,
|
||||
getSilentLogger,
|
||||
waitForSocketEvent,
|
||||
WS_OPEN_EVENT_PARTIAL,
|
||||
} from '../ws.util';
|
||||
|
||||
describe('Private Spot V3 Websocket Client', () => {
|
||||
@@ -19,7 +21,7 @@ describe('Private Spot V3 Websocket Client', () => {
|
||||
key: API_KEY,
|
||||
secret: API_SECRET,
|
||||
};
|
||||
const wsTopic = `outboundAccountInfo`;
|
||||
const wsTopic = 'outboundAccountInfo';
|
||||
|
||||
describe('with invalid credentials', () => {
|
||||
it('should reject private subscribe if keys/signature are incorrect', async () => {
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import {
|
||||
WebsocketClient,
|
||||
WSClientConfigurableOptions,
|
||||
WS_KEY_MAP,
|
||||
WebsocketClient,
|
||||
} from '../../src';
|
||||
import {
|
||||
logAllEvents,
|
||||
getSilentLogger,
|
||||
fullLogger,
|
||||
waitForSocketEvent,
|
||||
WS_OPEN_EVENT_PARTIAL,
|
||||
fullLogger,
|
||||
getSilentLogger,
|
||||
logAllEvents,
|
||||
waitForSocketEvent,
|
||||
} from '../ws.util';
|
||||
|
||||
describe('Public Spot V1 Websocket Client', () => {
|
||||
@@ -64,7 +66,7 @@ describe('Public Spot V1 Websocket Client', () => {
|
||||
try {
|
||||
await wsUpdatePromise;
|
||||
} catch (e) {
|
||||
console.error(`Wait for spot v1 orderbook event exception: `, e);
|
||||
console.error('Wait for spot v1 orderbook event exception: ', e);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import {
|
||||
WebsocketClient,
|
||||
WSClientConfigurableOptions,
|
||||
WS_KEY_MAP,
|
||||
WebsocketClient,
|
||||
} from '../../src';
|
||||
import {
|
||||
logAllEvents,
|
||||
getSilentLogger,
|
||||
fullLogger,
|
||||
waitForSocketEvent,
|
||||
WS_OPEN_EVENT_PARTIAL,
|
||||
fullLogger,
|
||||
getSilentLogger,
|
||||
logAllEvents,
|
||||
waitForSocketEvent,
|
||||
} from '../ws.util';
|
||||
|
||||
describe('Public Spot V3 Websocket Client', () => {
|
||||
|
||||
Reference in New Issue
Block a user