View README.md

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
View readme.md

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) {
    this.timeout(10);
    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" />
<context>
<option name="JAVA_SCRIPT" value="true" />
</context>
</template>
<template name="be" value="beforeEach(function() {&#10; $END$&#10;});" description="beforeEach" toReformat="true" toShortenFQNames="true">
<context>
<option name="JAVA_SCRIPT" value="true" />
View svg-ellipsis.directive.ts
/**
* @see https://stackoverflow.com/questions/15975440/add-ellipses-to-overflowing-text-in-svg
* @example
* <!-- truncate at 200px -->
* <svg><svg:text ellipsis [text]="text to truncate" [width]="200"></svg:text></svg>
*/
import {
Directive,
ElementRef,
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": [
[
"env",
{
"targets": {
"node": 4
}
}
]
View keybase.md

Keybase proof

I hereby claim:

  • I am boneskull on github.
  • I am boneskull (https://keybase.io/boneskull) on keybase.
  • I have a public key ASA2SWhelHgPkaVgFSjjGewaMahzlqWtobK3ciwLKWoEGAo

To claim this, I am signing this object: