lairtech lairtech - 3 months ago 19
Javascript Question

How can I retrieve the current test's name within a Mocha test?

For additional logging, I need to be able to print the current test's description.

How can I do this (with Mocha BDD)?

Answer

Here you go:

console.log(this.title);