mochajs/mocha — pull request #1439 by boneskull (2014-11-21 12:02:47+00:00)
Title: add ability to delay root suite; closes #362, closes #1124

This allows delayed root suite execution with flag `--delay`.

While I was in there I refactored some to reduce LOC (see `lib/interfaces/common.js`).

It works like this:

- if you specify `--delay`, the Runner will wait until the root suite has emitted a `run` event
- in addition, `--delay` will put a function `run()` in the global context
- once you have done your async business and generated your suite(s), call `run()`.
- this emits the event on the root suite, and it is executed.

See the [unit test](/boneskull/mocha/blob/be02d437cfaea67c177f7422e9bde97bbd2c66dd/test/delay/delay.js) for an example.

Also rebuilt `/mocha.js`.