lairtech lairtech - 1 year ago 62
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 Source

Here you go:

console.log(this.title);