jsunity will rightly complain that [[1],2], [1,2] are unequal:
assertEqual([[1],2], [1,2])
However, the output is confusing:
assertEqual: (1,2) is not equal to (1,2)
The patch I'm proposing changes the output to this:
assertEqual: ([1, 2]) is not equal to ([[1], 2])
It does so by finding the type of the argument and using that as a key
into a map that returns the stringify function for that particular type or
null. When null is returned, the default toString() is used.
With this map it is easy to extend the Stringification for other types.
The patch applies to r152
(http://code.google.com/p/jsunity/source/browse/trunk/jsunity/downloads/jsunity-0.6.js).
Would you accept this patch?
Thank you
Bernhard