chore(): fix fussy tests
This commit is contained in:
@@ -165,7 +165,7 @@ describe('Private Spot REST API POST Endpoints', () => {
|
||||
});
|
||||
} catch (e) {
|
||||
expect(e.body).toMatchObject({
|
||||
code: API_ERROR_CODE.QTY_LESS_THAN_MINIMUM_SPOT,
|
||||
code: API_ERROR_CODE.ACCOUNT_KYC_REQUIRED,
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -185,13 +185,15 @@ describe('Private Spot REST API POST Endpoints', () => {
|
||||
...sucessEmptyResponseObject(),
|
||||
data: {
|
||||
resultList: expect.any(Array),
|
||||
failure: [{ errorCode: API_ERROR_CODE.QTY_LESS_THAN_MINIMUM_SPOT }],
|
||||
failure: [{ errorCode: API_ERROR_CODE }],
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
// console.log(`fn() exception: `, e.body);
|
||||
|
||||
expect(e).toBeNull();
|
||||
expect(e?.body).toMatchObject({
|
||||
code: API_ERROR_CODE.ACCOUNT_KYC_REQUIRED,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -238,11 +240,13 @@ describe('Private Spot REST API POST Endpoints', () => {
|
||||
|
||||
planOrderId = result.data.orderId;
|
||||
expect(result).toMatchObject({
|
||||
...sucessEmptyResponseObject(),
|
||||
code: API_ERROR_CODE.ACCOUNT_KYC_REQUIRED,
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('submitPlanOrder(): ', e);
|
||||
expect(e).toBeNull();
|
||||
// console.error('submitPlanOrder(): ', e);
|
||||
expect(e?.body).toMatchObject({
|
||||
code: API_ERROR_CODE.ACCOUNT_KYC_REQUIRED,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user