grunt-mocha icon indicating copy to clipboard operation
grunt-mocha copied to clipboard

Added support for mocha hooks

Open DepthDeluxe opened this issue 11 years ago • 2 comments

Added support for a pretty undocumented feature of mocha. When mocha is run programmatically (i.e. mocha.run()), the function returns a runner object which has events a user can subscribe to. This can be useful for utilities such as code coverage reporting which needs to be performed after mocha tests are done in phantomjs.

See this article for a more in-depth explanation of the hooks.

DepthDeluxe avatar Jul 31 '14 22:07 DepthDeluxe

resolves #44. User can subscribe to the end hook to POST coverage information to a middleware service like istanbul-middleware.

DepthDeluxe avatar Jul 31 '14 22:07 DepthDeluxe

Oops, seems I missed this one. Some test coverage would be all that's required for this to be merged! Especially since it is undocumented.

kmiyashiro avatar Feb 27 '15 19:02 kmiyashiro