chore(): route tests via proxy instead of github CI address

This commit is contained in:
tiagosiebler
2023-08-18 16:21:13 +01:00
parent 9bc1ff89c6
commit 21ac313f38
37 changed files with 581 additions and 415 deletions

View File

@@ -1,4 +1,5 @@
import { API_ERROR_CODE, SpotClientV3 } from '../../src';
import { getTestProxy } from '../proxy.util';
import { successResponseObjectV3 } from '../response.util';
describe('Private Spot REST API POST Endpoints', () => {
@@ -10,11 +11,14 @@ describe('Private Spot REST API POST Endpoints', () => {
expect(API_SECRET).toStrictEqual(expect.any(String));
});
const api = new SpotClientV3({
key: API_KEY,
secret: API_SECRET,
testnet: false,
});
const api = new SpotClientV3(
{
key: API_KEY,
secret: API_SECRET,
testnet: false,
},
getTestProxy(),
);
const symbol = 'BTCUSDT';
const ltCode = 'BTC3S';
@@ -28,7 +32,7 @@ describe('Private Spot REST API POST Endpoints', () => {
symbol,
orderQty: '10000',
orderType: 'MARKET',
})
}),
).toMatchObject({
retCode: API_ERROR_CODE.BALANCE_INSUFFICIENT_SPOT_V3,
});
@@ -38,7 +42,7 @@ describe('Private Spot REST API POST Endpoints', () => {
expect(
await api.cancelOrder({
orderId: '1231231',
})
}),
).toMatchObject({
retCode: API_ERROR_CODE.ORDER_NOT_FOUND_SPOT_V3,
});
@@ -49,7 +53,7 @@ describe('Private Spot REST API POST Endpoints', () => {
await api.cancelOrderBatch({
symbol,
orderTypes: ['LIMIT', 'LIMIT_MAKER'],
})
}),
).toMatchObject(successResponseObjectV3());
});