Adding logs to mocha awesome report and retrieving test context #107
-
Question:
settings.setLogLevel('ERROR');
it('Verify creation of surgery facility without surgery related fields ', async () => {
console.log("request" + request.createFacilityWithRequiredFields.rates.CNA)
request.createFacilityWithRequiredFields.salesforceID = configData.salesforceid + utility.randomInteger().toString()
await pactum.spec()
.post(endpoints.baseUrl + endpoints.createHCF)
.withBody(request.createSurgeyFacilityWithoutRequiredFields)
.withHeaders('Accept', 'application/json')
.withHeaders('Authorization', configData.HCFAuthorization)
console.log("request" + request.createFacilityWithRequiredFields.rates.CNA)
}); |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Passing test context only works with normal functions and won't work with arrow functions. it('works ', async function () { });
it('does not works ', async () => { });
Can you give us more details with examples.
What logs do you want to have visibility over? |
Beta Was this translation helpful? Give feedback.
-
@vinayak-kaladhar - added an example of integration of pactum with mochawesome reporter here.
|
Beta Was this translation helpful? Give feedback.
@vinayak-kaladhar - added an example of integration of pactum with mochawesome reporter here.