jquery/qunit — Issue #206: Test diff output shouldn't depend on object property order
Author: gijsk
Created: 2012-03-02 12:20:46+00:00
State: open

If one uses deepEqual to compare two objects and the equality test fails, the diff output seems to depend on the order in which properties were set on the object (probably because it uses for...in). [I made a trivial example using jsfiddle](http://jsfiddle.net/mhpZA/)

I haven't quite figured out how to trick it into behaving its worst, but I've definitely seen it produce rather terrible output when property order doesn't match across objects. For more easily figuring out 'where' in the object differences occur, it would be nice if the output were improved (perhaps by sorting the properties of each object before doing a diff?).