QUnit::equiv Envjs Rhino/SpiderMonkey
I'm currently trying to get Envjs on Rhino compliant with jQuery 1.4.x and QUnit.equiv is giving me a bit of trouble. Not because of an actual bug but only because when properties of a Node are enumerated for deep equivalence checking (which is good) the properties are not enumerated in the same order (which can be bad).
I'm sure 99% of dev's are aware of this rhino/spidermonkey difference but it's not normally an issue. Unfortunately rhino enumerates parentNode before childNodes and that leads to an immediate infinite recursion. I might be able to figure out how to force rhino to enumerate properties in a different order but I thought it might benefit QUnit to expose a couple currently hidden hooks so I can at least get past the issue and even better eventually easily 'plugin' an appropriate equiv.hoozit to better deal with the issue on rhino.
In general this is all that's needed to allow a QUnit user to manipulate QUnit.equiv to suit their needs:
@line 866 inside QUnit.equiv
//allow extension/overriding of deep type checking routines
innerEquiv.callbacks = callbacks;
This allows me to hook into "object", "array" etc.
Just a little better would be a hook into QUnit.equiv.hoozit, but it requires a more substantial rewrite to allow hooks via a switch or something based on typing. I'll just hint at that for now and will provide a suggested patch as soon as I have a chance.
Thanks a ton,
PS. I am using QUnit on a new project for testing a python server-side project at the Library of Congress and have it running with continuous integration via Hudson with Envjs. The new QUnit reports are beautiful and are published by writing out the resulting html. I'm writing a little QUnit/jQuery plugin to allow previous tests to be saved and loaded without rerunning but still allowing the collapsible tests and toolbar functionality. I'll post the plugin soon but want you to know I really appreciate the latest QUnit.