Here's an example of how to debug Mocha v4 if it hangs.

Ensure you're using a Node.js 8 or newer (or any version with async_hooks support).

If you run your test, you'll notice it hangs:

$ mocha test.js

Say we have a JS library, and that library exports an API.

For the sake of argument, that library could be mocha and the API could be the "BDD" interface:

describe('my suite', function () {
  it('should timeout in 10s', function (done) {
    setTimeout(done, 9000);
View mocha.xml
<templateSet group="Mocha">
<template name="desc" value="describe('$DESC$', function() {&#10; $END$&#10;});" description="makes a describe block" toReformat="true" toShortenFQNames="true">
<variable name="DESC" expression="jsMethodName()" defaultValue="" alwaysStopAt="true" />
<option name="JAVA_SCRIPT" value="true" />
<template name="be" value="beforeEach(function() {&#10; $END$&#10;});" description="beforeEach" toReformat="true" toShortenFQNames="true">
<option name="JAVA_SCRIPT" value="true" />
View svg-ellipsis.directive.ts
* @see
* @example
* <!-- truncate at 200px -->
* <svg><svg:text ellipsis [text]="text to truncate" [width]="200"></svg:text></svg>
import {
View .block
license: mit
View .block
license: mit
View .block
license: mit
View main.yml
# This task just includes everything else we need
- include_role:
# a task to install nodejs from Nodesource's distros
name: nodejs
- include_role:
# a task to install nginx
name: web
# everything below here is in this gist
- include: prerequisites.yml
View .babelrc
"presets": [
"targets": {
"node": 4

Keybase proof

I hereby claim:

  • I am boneskull on github.
  • I am boneskull ( on keybase.
  • I have a public key ASA2SWhelHgPkaVgFSjjGewaMahzlqWtobK3ciwLKWoEGAo

To claim this, I am signing this object: