jquery/qunit — pull request #578 by mixonic (2014-05-22 12:24:08+00:00)
Title: jsDump: Add a depth parameter to object parsing

In projects with deep object graphs, like Ember, walking all properties of an an object recursively can end up walking most of memory. This causes the browser to run out of memory and kill the tab/thread.

This introduces a depth option for the parse function, which is used in places where an strictly accurate output of an object is not needed, for instance, when showing two un-equal objects in test output.

I've hard-coded the depth to 5 for output value comparisons. I think this should possibly be configurable? However I'm unsure where/how to reference that. I thought I could read a value right off `config.currentModuleTestEnvironment`?

This is the product of a long afternoon of debugging, and I'm happy to do whatever I must to save others form being bit by the same issue.