chore(): lint for trailing commas, fix tests with new types
This commit is contained in:
@@ -57,7 +57,7 @@ describe('Private Futures REST API GET Endpoints', () => {
|
||||
it('getOpenCount()', async () => {
|
||||
try {
|
||||
expect(
|
||||
await api.getOpenCount(symbol, marginCoin, 20000, 1)
|
||||
await api.getOpenCount(symbol, marginCoin, 20000, 1),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {
|
||||
@@ -102,7 +102,7 @@ describe('Private Futures REST API GET Endpoints', () => {
|
||||
endTime: to,
|
||||
marginCoin,
|
||||
symbol,
|
||||
})
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {
|
||||
@@ -125,7 +125,7 @@ describe('Private Futures REST API GET Endpoints', () => {
|
||||
startTime: from,
|
||||
endTime: to,
|
||||
productType: 'umcbl',
|
||||
})
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {
|
||||
@@ -180,7 +180,7 @@ describe('Private Futures REST API GET Endpoints', () => {
|
||||
it('getProductTypeOrderHistory()', async () => {
|
||||
try {
|
||||
expect(
|
||||
await api.getProductTypeOrderHistory('umcbl', from, to, '10')
|
||||
await api.getProductTypeOrderHistory('umcbl', from, to, '10'),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: expect.any(Object),
|
||||
@@ -223,7 +223,7 @@ describe('Private Futures REST API GET Endpoints', () => {
|
||||
await api.getProductTypeOrderFills('umcbl', {
|
||||
startTime: from,
|
||||
endTime: to,
|
||||
})
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: expect.any(Object),
|
||||
@@ -253,7 +253,7 @@ describe('Private Futures REST API GET Endpoints', () => {
|
||||
startTime: from,
|
||||
endTime: to,
|
||||
symbol,
|
||||
})
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: expect.any(Object),
|
||||
@@ -267,7 +267,7 @@ describe('Private Futures REST API GET Endpoints', () => {
|
||||
it('getCopyTraderOpenOrder()', async () => {
|
||||
try {
|
||||
expect(
|
||||
await api.getCopyTraderOpenOrder(symbol, 'umcbl', 1, 0)
|
||||
await api.getCopyTraderOpenOrder(symbol, 'umcbl', 1, 0),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: expect.any(Object),
|
||||
@@ -282,7 +282,7 @@ describe('Private Futures REST API GET Endpoints', () => {
|
||||
it('getCopyFollowersOpenOrder()', async () => {
|
||||
try {
|
||||
expect(
|
||||
await api.getCopyFollowersOpenOrder(symbol, 'umcbl', 1, 0)
|
||||
await api.getCopyFollowersOpenOrder(symbol, 'umcbl', 1, 0),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: expect.any(Object),
|
||||
@@ -300,7 +300,7 @@ describe('Private Futures REST API GET Endpoints', () => {
|
||||
{
|
||||
...sucessEmptyResponseObject(),
|
||||
data: expect.any(Object),
|
||||
}
|
||||
},
|
||||
);
|
||||
} catch (e) {
|
||||
expect(e.body).toMatchObject({
|
||||
@@ -342,8 +342,8 @@ describe('Private Futures REST API GET Endpoints', () => {
|
||||
marginCoin,
|
||||
from,
|
||||
1,
|
||||
1
|
||||
)
|
||||
1,
|
||||
),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: expect.any(Object),
|
||||
@@ -358,7 +358,7 @@ describe('Private Futures REST API GET Endpoints', () => {
|
||||
it('getCopyTraderHistoricProfitDetail()', async () => {
|
||||
try {
|
||||
expect(
|
||||
await api.getCopyTraderHistoricProfitDetail(marginCoin, from, 1, 1)
|
||||
await api.getCopyTraderHistoricProfitDetail(marginCoin, from, 1, 1),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: expect.any(Object),
|
||||
|
||||
@@ -53,7 +53,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
it('setMarginMode()', async () => {
|
||||
try {
|
||||
expect(
|
||||
await api.setMarginMode(symbol, marginCoin, 'crossed')
|
||||
await api.setMarginMode(symbol, marginCoin, 'crossed'),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
@@ -76,7 +76,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
symbol,
|
||||
size: '1',
|
||||
side: 'open_long',
|
||||
})
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
@@ -100,7 +100,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
size: '1',
|
||||
side: 'open_long',
|
||||
},
|
||||
])
|
||||
]),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
@@ -115,7 +115,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
it('cancelOrder()', async () => {
|
||||
try {
|
||||
expect(
|
||||
await api.cancelOrder(symbol, marginCoin, '1234656')
|
||||
await api.cancelOrder(symbol, marginCoin, '1234656'),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
@@ -130,7 +130,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
it('batchCancelOrder()', async () => {
|
||||
try {
|
||||
expect(
|
||||
await api.batchCancelOrder(symbol, marginCoin, ['1234656'])
|
||||
await api.batchCancelOrder(symbol, marginCoin, ['1234656']),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
@@ -164,7 +164,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
symbol,
|
||||
triggerPrice: '1000',
|
||||
triggerType: 'market_price',
|
||||
})
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
@@ -187,7 +187,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
symbol,
|
||||
triggerPrice: '100',
|
||||
triggerType: 'market_price',
|
||||
})
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
@@ -207,7 +207,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
marginCoin,
|
||||
symbol,
|
||||
presetTakeProfitPrice: '100',
|
||||
})
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
@@ -229,7 +229,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
planType: 'profit_plan',
|
||||
holdSide: 'long',
|
||||
triggerPrice: '100',
|
||||
})
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
@@ -251,7 +251,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
holdSide: 'long',
|
||||
planType: 'profit_plan',
|
||||
triggerPrice: '50',
|
||||
})
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
@@ -270,7 +270,8 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
marginCoin,
|
||||
symbol,
|
||||
orderId: '123456',
|
||||
})
|
||||
planType: 'profit_plan',
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
@@ -292,7 +293,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
symbol,
|
||||
orderId: '123456',
|
||||
planType: 'profit_plan',
|
||||
})
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
@@ -310,7 +311,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
{
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
}
|
||||
},
|
||||
);
|
||||
} catch (e) {
|
||||
expect(e.body).toMatchObject({
|
||||
@@ -324,7 +325,7 @@ describe('Private Futures REST API POST Endpoints', () => {
|
||||
expect(
|
||||
await api.modifyCopyTraderTPSL(symbol, '123456', {
|
||||
stopLossPrice: 1234,
|
||||
})
|
||||
}),
|
||||
).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {},
|
||||
|
||||
@@ -70,7 +70,7 @@ describe('Public Spot REST API Endpoints', () => {
|
||||
|
||||
it('getCandles()', async () => {
|
||||
expect(
|
||||
await api.getCandles(symbol, '1min', `${from}`, `${to}`)
|
||||
await api.getCandles(symbol, '1min', `${from}`, `${to}`),
|
||||
).toMatchObject(expect.any(Array));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user