Hi,
Within Mocha, the test.body contains the test-step's JS code as a string. The purpose of this is to allow reporters such as Mochawesome to display the test-steps' JS code within the report.
Since mocha-steps is using 2 intermediary functions (sync & async), Mocha is now setting the .body to the JS code within these functions. For example, the report should display the test step's code such as this:
function() {
expect(1).to.equal(1);
}
But, instead it always appears like this, because Mocha thinks this function is the test-step function:
This has easily been resolved by setting the context.body to the actual test-step's fn.string(). This is confirmed working with a test. I'd really appreciate it if you could release a new version with this fix in. Many thanks, Ian
Hi, Within Mocha, the test.body contains the test-step's JS code as a string. The purpose of this is to allow reporters such as Mochawesome to display the test-steps' JS code within the report.
Since mocha-steps is using 2 intermediary functions (sync & async), Mocha is now setting the .body to the JS code within these functions. For example, the report should display the test step's code such as this:
But, instead it always appears like this, because Mocha thinks this function is the test-step function:
This has easily been resolved by setting the context.body to the actual test-step's fn.string(). This is confirmed working with a test. I'd really appreciate it if you could release a new version with this fix in. Many thanks, Ian