stefanpenner/ember-cli — pull request #1996 by rwjblue (2014-09-14 12:16:58+00:00)
Title: Fix model-test blueprint.

Passing a model (anything with a `toJSON` actually) into a test assertion causes infinite loop with Testem.

Steps:

* Do an assert in your test like ok(store.find('person', 1), "record
exists")
* QUnit stores the assertion in a test object.
* The test finishes so the record is destroyed automatically.
* QUnit notifies listeners the test is over.
* Testem listens for test end notification and attempts to ensure that
there are no cycles in it by calling `JSON.parse(JSON.stringify(testObject))`.
* Calls `toJSON()` recursively, including any destroyed object that was
used in an assertion.

Watch as tests hang when running ember test but work fine everywhere else.

Thanks to @tomdale for identifying and tracking the above steps down.