From bb33ca3dc71426cf8364f941aaa2ba141bd0229a Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Thu, 27 Mar 2025 11:18:35 +0100 Subject: [PATCH] chore(): updated test enums --- test/v2/private.read.test.ts | 5 ++++- test/v2/private.write.test.ts | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/v2/private.read.test.ts b/test/v2/private.read.test.ts index 46297da..b36076e 100644 --- a/test/v2/private.read.test.ts +++ b/test/v2/private.read.test.ts @@ -1,3 +1,4 @@ +import { API_ERROR_CODE } from '../../src'; import { RestClientV2 } from '../../src/rest-client-v2'; import { errorResponseObjectV3, @@ -164,7 +165,9 @@ describe('Bitget Private REST API Read Endpoints', () => { }); expect(res).toMatchObject(sucessEmptyResponseObject()); } catch (e) { - expect(e).toMatchObject(errorResponseObjectV3('40109')); // The data of the order cannot be found, please confirm the order number + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.FUTURES_ORDER_GET_NOT_FOUND), + ); // The data of the order cannot be found, please confirm the order number } }); }); diff --git a/test/v2/private.write.test.ts b/test/v2/private.write.test.ts index d831af4..ccd51a9 100644 --- a/test/v2/private.write.test.ts +++ b/test/v2/private.write.test.ts @@ -35,7 +35,9 @@ describe('Bitget Private REST API Write Endpoints', () => { }); expect(res).toMatchObject(sucessEmptyResponseObject()); } catch (e) { - expect(e).toMatchObject(errorResponseObjectV3('43012')); // not enough balance + expect(e).toMatchObject( + errorResponseObjectV3(API_ERROR_CODE.INSUFFICIENT_BALANCE), + ); // not enough balance } }); @@ -114,7 +116,7 @@ describe('Bitget Private REST API Write Endpoints', () => { } }); - it('spotWithdraw()', async () => { + it.skip('spotWithdraw()', async () => { try { const res = await api.spotWithdraw({ coin: 'BTC',