20 lines
449 B
TypeScript
20 lines
449 B
TypeScript
export function successResponseList(successMsg: string | null = 'OK') {
|
|
return {
|
|
result: expect.any(Array),
|
|
ret_code: 0,
|
|
ret_msg: successMsg,
|
|
};
|
|
}
|
|
|
|
export function successResponseObject(successMsg: string | null = 'OK') {
|
|
return {
|
|
result: expect.any(Object),
|
|
ret_code: 0,
|
|
ret_msg: successMsg,
|
|
};
|
|
}
|
|
|
|
export function notAuthenticatedError() {
|
|
return new Error('Private endpoints require api and private keys set');
|
|
}
|