I am using Mocha to run my test cases in a tool that I have built. To generate the report a use Mochawesome.
Now I need to add information to the HTML Report.
I have my test case:
describe('INTWL Response Pre Auth Flow network transaction and transactionID Validation', function () {
it('Step 1', async () => {
responseMessage = await class.sendMessages(objectMessage)
})
})
Inside my sendMessages function i have imported the:
var addContext = require('mochawesome/addContext.js');
and inside then called addContext inside the method:
addContext(this, { title: 'This is my context title', value: objectMessage})
The information inside objectMessage is not printed in the HTML report generated.
I know that I am using arrow functions but I can't change that and I can't use the add context directly inside the test case.
Any solution?