visionmedia/mocha — pull request #754 by jldailey (2013-02-21 17:18:03+00:00)
Title: use setImmediate when available instead of process.nextTick

In node 0.9+, recursive use of process.nextTick emits a warning (and will soon break).

The warning says to use setImmediate for recursive deferral. This pull request makes this change.

Tested against 0.8.9 (which lacks setImmediate) and 0.9.9 (which has it).