How do I make asynchronous calls in an event handler
问题 I'm trying to write a custom mocha reporter that integrates with a 3rd party that has a HTTP API. I took the basic example given of a custom reporter (https://github.com/mochajs/mocha/wiki/Third-party-reporters) and attempted to add a call to the API in the start event handler. However, the callback for my http request to the third party never seems to fire. Example code shown below. I've tested that the request code works as expected in other contexts, it just seems to be within the event