From a5fafbf46846138649cdbcaca52a27b2394f7c63 Mon Sep 17 00:00:00 2001 From: tiagosiebler Date: Sat, 12 Nov 2022 18:05:50 +0000 Subject: [PATCH] fix conflicting tests --- test/contract/private.write.test.ts | 4 ++-- test/linear/private.write.test.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/contract/private.write.test.ts b/test/contract/private.write.test.ts index dd3dee1..2145a58 100644 --- a/test/contract/private.write.test.ts +++ b/test/contract/private.write.test.ts @@ -73,7 +73,7 @@ describe('Private Contract REST API POST Endpoints', () => { it('setAutoAddMargin()', async () => { expect( await api.setAutoAddMargin({ - autoAddMargin: 0, + autoAddMargin: 1, side: 'Buy', symbol, positionIdx: 1, @@ -88,7 +88,7 @@ describe('Private Contract REST API POST Endpoints', () => { expect( await api.setMarginSwitch({ symbol, - tradeMode: 0, + tradeMode: 1, buyLeverage: '5', sellLeverage: '5', }) diff --git a/test/linear/private.write.test.ts b/test/linear/private.write.test.ts index fb82088..dd5c175 100644 --- a/test/linear/private.write.test.ts +++ b/test/linear/private.write.test.ts @@ -176,7 +176,9 @@ describe('Private Linear REST API POST Endpoints', () => { margin: 5, }) ).toMatchObject({ - ret_code: API_ERROR_CODE.ISOLATED_NOT_MODIFIED_LINEAR, + // ret_msg: '', + ret_code: API_ERROR_CODE.POSITION_SIZE_IS_ZERO, + // ret_code: API_ERROR_CODE.ISOLATED_NOT_MODIFIED_LINEAR, }); });