visionmedia/mocha — pull request #1140 by jugglinmike (2014-02-26 15:29:17+00:00)
Title: Do not crash when reporting on circular structures

Currently, Mocha attempts to stringify the `actual` and `expected`
properties of errors thrown by failing tests (when the `showDiff` flag
is set). If these structures contain circular references, the reporter
silently fails and Mocha exits with a status code of "0", hiding the
test failure.

Use the `json-stringify-safe` library to safely stringify objects that
may have circular references.