chore(): linting and precise match on unreliable test
This commit is contained in:
@@ -20,7 +20,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
|
|
||||||
it('getServerTime()', async () => {
|
it('getServerTime()', async () => {
|
||||||
expect(await api.getServerTime()).toMatchObject(
|
expect(await api.getServerTime()).toMatchObject(
|
||||||
successResponseObjectV3()
|
successResponseObjectV3(),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -32,7 +32,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
category: 'linear',
|
category: 'linear',
|
||||||
interval: '1',
|
interval: '1',
|
||||||
symbol: linearSymbol,
|
symbol: linearSymbol,
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject(successResponseObjectV3());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
category: 'linear',
|
category: 'linear',
|
||||||
interval: '1',
|
interval: '1',
|
||||||
symbol: linearSymbol,
|
symbol: linearSymbol,
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject(successResponseObjectV3());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
category: 'linear',
|
category: 'linear',
|
||||||
interval: '1',
|
interval: '1',
|
||||||
symbol: linearSymbol,
|
symbol: linearSymbol,
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject(successResponseObjectV3());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
category: 'linear',
|
category: 'linear',
|
||||||
interval: '1',
|
interval: '1',
|
||||||
symbol: linearSymbol,
|
symbol: linearSymbol,
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject(successResponseObjectV3());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
await api.getInstrumentsInfo({
|
await api.getInstrumentsInfo({
|
||||||
category: 'linear',
|
category: 'linear',
|
||||||
symbol: linearSymbol,
|
symbol: linearSymbol,
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject(successResponseObjectV3());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
await api.getOrderbook({
|
await api.getOrderbook({
|
||||||
category: 'linear',
|
category: 'linear',
|
||||||
symbol: linearSymbol,
|
symbol: linearSymbol,
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject(successResponseObjectV3());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
await api.getTickers({
|
await api.getTickers({
|
||||||
category: 'linear',
|
category: 'linear',
|
||||||
symbol: linearSymbol,
|
symbol: linearSymbol,
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject(successResponseObjectV3());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
await api.getFundingRateHistory({
|
await api.getFundingRateHistory({
|
||||||
category: 'linear',
|
category: 'linear',
|
||||||
symbol: linearSymbol,
|
symbol: linearSymbol,
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject(successResponseObjectV3());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -107,8 +107,12 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
await api.getPublicTradingHistory({
|
await api.getPublicTradingHistory({
|
||||||
category: 'linear',
|
category: 'linear',
|
||||||
symbol: linearSymbol,
|
symbol: linearSymbol,
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject({
|
||||||
|
...successResponseObjectV3(),
|
||||||
|
retMsg: 'OK',
|
||||||
|
retCode: 0,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('getOpenInterest()', async () => {
|
it('getOpenInterest()', async () => {
|
||||||
@@ -117,7 +121,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
category: 'linear',
|
category: 'linear',
|
||||||
symbol: linearSymbol,
|
symbol: linearSymbol,
|
||||||
intervalTime: '15min',
|
intervalTime: '15min',
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject(successResponseObjectV3());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -125,7 +129,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
expect(
|
expect(
|
||||||
await api.getHistoricalVolatility({
|
await api.getHistoricalVolatility({
|
||||||
category: 'option',
|
category: 'option',
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject(successResponseObjectV3());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -138,7 +142,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
await api.getRiskLimit({
|
await api.getRiskLimit({
|
||||||
category: 'linear',
|
category: 'linear',
|
||||||
symbol: linearSymbol,
|
symbol: linearSymbol,
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject(successResponseObjectV3());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -146,7 +150,7 @@ describe('Public V5 REST API Endpoints', () => {
|
|||||||
expect(
|
expect(
|
||||||
await api.getOptionDeliveryPrice({
|
await api.getOptionDeliveryPrice({
|
||||||
category: 'option',
|
category: 'option',
|
||||||
})
|
}),
|
||||||
).toMatchObject(successResponseObjectV3());
|
).toMatchObject(successResponseObjectV3());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user