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:
@@ -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),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user