feat(): add comprehensive tests for Bitget Private and Public REST API endpoints

- Introduced new test files for private read and write endpoints, covering account, trade, funding, and futures functionalities.
- Added public API tests for server time, ticker, order book, and market trades - Enhanced error handling in tests with specific error codes and messages.
- Updated response utility functions to improve error response structure.
- Removed outdated broker tests to streamline the test suite.
This commit is contained in:
JJ-Cro
2025-03-17 13:38:04 +01:00
parent e31c5fa4af
commit 1e7987a400
12 changed files with 453 additions and 1744 deletions

View File

@@ -28,13 +28,18 @@ export function errorResponseObject(
};
}
export function errorResponseObjectV3(
result: null | any = null,
retCode: number,
) {
export function errorResponseObjectV3(code: string, statusCode: number = 400) {
return {
result,
retCode: retCode,
body: {
code,
data: null,
msg: expect.any(String),
requestTime: expect.any(Number),
},
code: statusCode,
headers: expect.any(Object),
message: expect.any(String),
requestOptions: expect.any(Object),
};
}