chaijs/chai — pull request #104 by connec (2012-10-21 17:01:27+00:00)
Title: Added support (and tests) for circular references when checking deep (in)equality.

I needed this for a project I'm working on, so I've taken a crack at a solution. This is my first pull request, so please let me know if I'm missing anything.

The implementation is inspired by jasmine's [compareObjects](https://github.com/pivotal/jasmine/blob/master/src/core/Env.js#L171) function: simply marking each object with a (hopefully) unique field (`__chai_was_here__`), and checking against those fields to prevent recursing.

Master spec passes, and some specs have been added (drawn from chaijs/chai#98).